You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
switchs/main.py

16 lines
375 B
Python

from configparser import ConfigParser
from re2oapi import Re2oAPIClient
config = ConfigParser()
config.read('config.ini')
hostname = config.get('Re2o', 'hostname')
password = config.get('Re2o', 'password')
username = config.get('Re2o', 'username')
api_client = Re2oAPIClient(hostname, username, password)
extensions = api_client.list_extensions()
print(len(extensions))