Coder Social home page Coder Social logo

scout's Introduction

security: bandit

scout

Managing Autonomous Cisco APs

scout is the underlying logic that communicates with autonomous Cisco APs via SSH. The main component of scout is paramiko. scout is built on and requires Python3. scout and all other Cardinal components are tested against Python 3.6, 3.7, and 3.8.

Deprecation Notice

Starting April 9th, 2023, Cardinal development will no longer continue. If anyone wants to continue development, please feel free to fork this repo, along with the repo for scout. I'm going to merge all of the latest dependency PRs before archiving. The latest source code is essentially v3.0, with some things missing. Thank you to everyone who contributed over the years! Overall, I think I accomplished my goal of creating an open source Cisco access point controller.

Example Usage:

Python 3.6.9 (default, Jan 26 2021, 15:33:00) 
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from scout import info
>>> users = info.getUsers("192.168.2.5", "Cisco", "Cisco")
>>> print(users)
    Line       User       Host(s)              Idle       Location
*  1 vty 0     Cisco      idle                 00:00:00 test-sys-1

  Interface    User               Mode         Idle     Peer Address

scout's People

Contributors

chrispro-21 avatar falcon78921 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

scout's Issues

[Development] Looking for Maintainers

Well, it has been a ride! :)

Cardinal has been an awesome learning experience. It's overwhelming to think there's still much more to learn! Recently, I found the universe steering me in another direction. Instead of working on network automation/cloud components, I'm starting to really dive into creative technologies. Technologies like Krita and Blender, which allow artists to tell stories and provide a platform for 2D/3D animation, have been my primary focus lately. In order to build a foundation of knowledge with those technologies, I need to reallocate my time and trim some projects, like Cardinal/scout.

I'm very happy that people from all over the world use Cardinal. I think having an open source Cisco access point controller is still a valid use case, even in today's landscape. Technologies like Ansible and Meraki are out there, but for those who want to leverage a 100% open source dashboard/API solution, I'm happy to say Cardinal exists! :)

Thank you very much to everyone who's contributed to Cardinal! Thank you to everyone who:

Opened issues
Pull requests
Spread the word about Cardinal (through platforms like Reddit)
Cloned/starred the repos!
I'm sorry to all who experienced problems with Cardinal and didn't get the attention/answers they needed. This project, for the most part, has been a one person show. That's why I'm exceptionally grateful to the handful of Cardinal contributors who have helped patch code, test functionality, and report issues.

With that said, I'm looking for maintainers who might want to take over the project. Here are some things I was aiming to accomplish in Cardinal v3.0:

Implementing a real, RESTful API structure
Incorporating Redis/rq for asynchronous work
Improve the parallel operations for AP groups
Deploying a testing environment for scout/Cardinal operations
Continue on the path to making Cardinal cloud-native (e.g. Kubernetes)

Looking beyond, I think Cardinal would be better if structured using an ORM like Flask-SQLAlchemy. Objects are built out by hand, which is not great. It's ok for now, but if the platform continues growing, things are going to get more messy. Maybe Cardinal would be better designed with Django? Maybe scout should be replaced with Ansible? There are a lot of options out there.

If you're interested in maintaining the Cardinal repos, please feel free to leave a comment here :)

Getting an error trying to send any command to the AP - Template Error

I've hit several hurdles trying to get cardinal installed, and I've finally stumped myself on this. I think I finally have the environment variables set properly, and have scout finding the right config variables. But now I get this:

[2022-05-21 01:41:39,651] ERROR in app: Exception on /get-ap-info [POST] Traceback (most recent call last): File "/home/jason/Cardinal/lib/python3.8/site-packages/flask/app.py", line 2073, in wsgi_app response = self.full_dispatch_request() File "/home/jason/Cardinal/lib/python3.8/site-packages/flask/app.py", line 1518, in full_dispatch_request rv = self.handle_user_exception(e) File "/home/jason/Cardinal/lib/python3.8/site-packages/flask/app.py", line 1516, in full_dispatch_request rv = self.dispatch_request() File "/home/jason/Cardinal/lib/python3.8/site-packages/flask/app.py", line 1502, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args) File "/home/jason/Cardinal/webapp/./cardinal/views/cardinal_ap_ops.py", line 150, in fetchApInfo status = gatherApInfo(apId) File "/home/jason/Cardinal/webapp/./cardinal/system/cardinal_fetch.py", line 57, in gatherApInfo apInfo = info.fetcher(ip=apIp, username=apSshUsername, password=apSshPassword) File "/home/jason/Cardinal/lib/python3.8/site-packages/scout/info.py", line 198, in fetcher cmdTemplate = jinjaEnv.get_template("scout_fetcher") File "/home/jason/Cardinal/lib/python3.8/site-packages/jinja2/environment.py", line 997, in get_template return self._load_template(name, globals) File "/home/jason/Cardinal/lib/python3.8/site-packages/jinja2/environment.py", line 958, in _load_template template = self.loader.load(self, name, self.make_globals(globals)) File "/home/jason/Cardinal/lib/python3.8/site-packages/jinja2/loaders.py", line 125, in load source, filename, uptodate = self.get_source(environment, name) File "/home/jason/Cardinal/lib/python3.8/site-packages/jinja2/loaders.py", line 214, in get_source raise TemplateNotFound(template) jinja2.exceptions.TemplateNotFound: scout_fetcher [pid: 3253|app: 0|req: 19/45] 192.168.0.248 () {52 vars in 1173 bytes} [Sat May 21 01:41:39 2022] POST /get-ap-info => generated 290 bytes in 613 msecs (HTTP/1.1 500) 3 headers in 113 bytes (1 switches on core 0)

I'm guessing that a path isn't set correctly, and jinja2 isn't seeing the template directory in scout for whatever reason. But I'm not sure where I should start looking.

Any suggestions?

Thanks

[Development] Improve `fetcher()` When Fetching `apBandwidth`

See: https://github.com/cardinal-dev/Cardinal/blob/master/lib/scout/scout_info.py#L198
See: cardinal-dev/Cardinal#150 (comment)

(Pdb) print(sshData[3])
show interface gi0 | i Mbps
  Full Duplex, 100Mbps, media type is T
Legion#
(Pdb) print(sshData[3].split(","))
['show interface gi0 | i Mbps\r\n  Full Duplex', ' 100Mbps', ' media type is T\r\nLegion#']
(Pdb) print(sshData[3])
show interface gi0 | i Mbps
  Full Duplex, 100Mbps, media type is T
Legion#

Thanks to @sgeneralgrievous & @MLWALK3R

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.