Code Monkey home page Code Monkey logo

aioruckus's People

Contributors

ms264556 avatar onkelbeh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

aioruckus's Issues

Support older ZD/Unleashed

Older ZD and UL don't use the XSS cookie, so change login to look for redirect to .html page and only add XSS header if XSS cookie is found.

Rukus Unleashed Backup

Hello,

As per your instruction, I run the code with my credentials, I am getting this error, pls help me to resolve the issue.

Error:
= RESTART: C:/Users/Administrator.AD/Documents/Python/ruckus.oy.py
Traceback (most recent call last):
File "C:/Users/Administrator.AD/Documents/Python/ruckus.oy.py", line 17, in
asyncio.run(backup_demo())
File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
File "C:\Program Files\Python311\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
File "C:\Program Files\Python311\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
File "C:/Users/Administrator.AD/Documents/Python/ruckus.oy.py", line 13, in backup_demo
backup = await session.api.get_backup()
AttributeError: 'RuckusAjaxApi' object has no attribute 'get_backup'


Code:

import asyncio
from datetime import datetime
from aioruckus import AjaxSession

async def backup_demo():
"""aioruckus backup demo"""

backup_filename = "C:\Switch_Backup\Ruckus" + datetime.now().strftime("%y%m%d_%H%M") + ".bak"

# example of saving a backup
async with AjaxSession.async_create("<ruckus_ip>", "admin", "<password>") as session:
    backup = await session.api.get_backup()
    with open(backup_filename , "wb") as file:
        file.write(backup)

asyncio.run(backup_demo())

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.