semvec/pypi-packages huggingface dataset:
pyarubaswitch 0.2.3
Python requests based REST-API-Client for aruba switches.
Requires Python: >=3.10

# Aruba switch API python  client

Python based REST-API client for Aruba switches (not ArubaOSX).

See workflows for examples on how to use.

### Requirements
Only tested with REST-API version 7 on aruba switch. The older REST-APIs where very slow anyhow.
See https://asp.arubanetworks.com for latest firmware.
You can check firmware version here: 
http:///switch-ip-adress/rest/version

Also requires the requests module.

### Installation 
```
pip install pyarubaswitch
```

### Basic Usage examples

```
from pyarubaswitch import ArubaSwitchClient
client = ArubaSwitchClient("192.168.1.4","username","password")


client.get_lldp_aps()              client.get_port_vlan()             client.get_system_status()
client.get_lldp_info()             client.get_snmpv3()                client.get_telnet_server_status()
client.get_lldp_switches()         client.get_sntp()                  
client.get_loop_protected_ports()  client.get_stp_info()              

client.get_loop_protected_ports()
['2'] 

client.get_system_status()
name: switch-name, hw: J9774A, fw: YA.16.10.0007, sn: XXXXXXX

client.logout()
```
Always do .logout() after your done with API calls. Otherwise the switch might run out of API-sessions and you must either reset rest-api interface on the switch or wait for the session timer to run out.

**note** that method above uses HTTP and is not secure. To use HTTPS you must first install a certificate on the switch and then use the client with ssl.
To use ssl for all calls, no validation of cert:
```
ssl_client = ArubaSwitchClient("192.168.1.4","username","password",SSL=True)  
```
To use validate ssl:
```
ssl_client = ArubaSwitchClient("192.168.1.4","username","password",SSL=True,validate_ssl=True)
```


The runners in workslows can also be used with a variable file in yaml-format like so:
```
username: "username"
password: "supersecretpassword"
switches:
  - "192.168.1.4"
  - "192.168.1.5"
```
### How to generate self-signed cert on switch from cli 
```
Configuration example: 
    (config)# crypto pki identity-profile Test_Profile subject
    Enter Common Name(CN) : myTestSwitch
    Enter Org Unit(OU) : myOrgUnit
    Enter Org Name(O) : myOrg
    Enter Locality(L) : myLocation
    Enter State(ST) : myState
    Enter Country(C) : NL
    (config)# crypto pki enroll-self-signed certificate-name Test_Certificate
    or : crypto pki enroll-self-signed certificate-name test2 key-type ecdsa
    (config)# web-management ssl

```
### Very simplle self-signed cert sample with rest-enabled sample
```
rest-interface
crypto pki enroll-self-signed certificate-name sll-self subject common-name switchmgmt
web-management ssl
```
aws-recommendation-a20 0.1.11
Provides AWS recommendations
Requires Python: >=3.7

# aws_recommendations

aws_recommendations package gives recommendation for you aws account

Release Notes:
# v0.0.28
1. Bug fixes and stability improvements

# v0.0.10
1. Added methods for following recommendations:
   - Low Utilization Amazon EC2 Instances
   - Underutilized Amazon Redshift Clusters
   - idle ebs volumes
   - Idle elb
   - enable s3 bucket keys
   - rds_general_purpose_ssd
   - ebs_general_purpose_ssd
   - unused_ami

# v0.0.7
1. Added methods for new recommendations
2. Added following methods:
   1. reserved_instance_lease_expiration()
   2. unassociated_elastic_ip_addresses()
   3. rds_idle_db_instances()

# v0.0.3
1. Minor bug fixes

# v0.0.2
1. Improved code quality
2. Multi region now supported

# v0.0.1 - Initial Release
aws-recommendation-a19 0.1.11
Provides AWS recommendations
Requires Python: >=3.7

# aws_recommendations

aws_recommendations package gives recommendation for you aws account

Release Notes:
# v0.0.28
1. Bug fixes and stability improvements

# v0.0.10
1. Added methods for following recommendations:
   - Low Utilization Amazon EC2 Instances
   - Underutilized Amazon Redshift Clusters
   - idle ebs volumes
   - Idle elb
   - enable s3 bucket keys
   - rds_general_purpose_ssd
   - ebs_general_purpose_ssd
   - unused_ami

# v0.0.7
1. Added methods for new recommendations
2. Added following methods:
   1. reserved_instance_lease_expiration()
   2. unassociated_elastic_ip_addresses()
   3. rds_idle_db_instances()

# v0.0.3
1. Minor bug fixes

# v0.0.2
1. Improved code quality
2. Multi region now supported

# v0.0.1 - Initial Release
logger-via 1.0.2
Logging decorators (file or email)
Requires Python: >=3.6

# General Purpose
The package holds two decorators that can wrap a python function and save the details of it's execution
into a log. The details include the name of the function, args and kwargs and what did the function return.
This is achieved by means of redirecting stderr and stdout to a file or an email (depending on which
decorator is used)
	
@log - decorator save the log into a file. A relative path: 'output/log.txt' is used by default. Does not require
preliminary setup in "config.py" unless another output directory wanted.

@email_log - decorator send the log by email. The usage require SMTP server to be configured at "config.py".
	
# Package Composition
### config.py
The setup and configuration file with constants used in the logger. 

    LOG_FILE:     The path to a log saved by @log decorator. 'output/log.txt' is used by default.

    SENDER:       The sender's email will be displayed in the From: field (in the body of the letter).
                  May be helpful to specify an email to receive email replies from log recipients.
                  Actual email that sends out the letter depend strongly on SMTP server policy.
    RECEIVER:     An email where the logs will be sent.
    MAIL_SERVER:  A functioning and adjusted SMTP server.
    PORT:         SMTP port (an integer)
    USERNAME:     SMTP username (received from SMTP server. Frequently - a sender's email)
    PASSWORD:     SMTP password (received from SMTP server. Frequently - a sender's password)
    
SUGGESTION: The package was tested with AWS "Simple Email Service" SMTP provider (https://aws.amazon.com/ses/). 
### logger.py
The decorators themselves are described in this file. If the output format needs modification, the f-strings in decorators
can be modified here.


# Operation Manual
To use the package follow the steps:  
- pip install logger_via  
- modify SMTP details in "config.py"  
- from logger import log / from logger import email_log  
- wrap the functions with @log / @email_log

# License
The package designed by Vladimir Iakimenko (https://github.com/VladIakimenko).  
Free for distribution, modification or contribution.  
With feedback address to v_yakimenko@inbox.ru
parsagon-server 0.0.3
Parsagon Server
Requires Python: >=3.6

# parsagon-server

To install on Ubuntu 20:
```
sudo apt update
sudo apt install -y python3-pip
sudo apt install -y python3-venv

python3 -m venv parsagon-venv
source parsagon-venv/bin/activate
pip install parsagon-server
parsagon-server <paste your api_key here>
```

For development:
Make sure to include the test server as a second argument to parsagon-server:
`parsagon-server <api_key> <test_server>`

To add a proxy:
Edit /etc/tinyproxy/tinyproxy.conf to point to your proxy, then run:
`sudo service tinyproxy restart`
and add
`PROXY=127.0.0.1:8888` to `daphne.sh`, `page_cache.sh`, and `celery.sh` and restart those tasks as well.