Code Monkey home page Code Monkey logo

uspython's Introduction

USP Agent Manager

A Python-based utility for streamlined management of User Services Platform (USP) agents within Docker environments.

Features

  • Dependency Installation: Automates the installation of Docker and Docker Compose, ensuring a seamless setup experience.
  • Agent Acquisition: Fetches USP agents directly from the official Broadband Forum repository.
  • Agent Creation: Provides guided configuration for generating new USP agents with tailored settings.
  • Agent Modification: Enables straightforward editing of existing USP agent configurations.
  • Agent Overview: Displays a comprehensive list of currently installed USP agents.
  • Agent Removal: Simplifies the deletion of USP agents when necessary.

Prerequisites

  • Python

Installation

  1. Clone the repository:

    git clone https://github.com/polarnaldo/USPython.git
  2. Change into the project directory:

    cd USPython
  3. Execute the script:

    • Interface mode:
    sudo python3 USPython.py -m interface
    • Command mode:
    sudo python3 USPython.py -m command
    • Show help:
    sudo python3 USPython.py
  4. Command Arguments:

If you are going to use the command mode, you must execute the following commands before executing the mode:

  • -i or --install: Install dependencies.
  • -d or --download: Download USP Agent.

To use these optional arguments, you can run the script as follows:

sudo python3 USPython.py -i
sudo python3 USPython.py --install
sudo python3 USPython.py -d
sudo python3 USPython.py --download

The -i or --install option indicates the intention to install dependencies required by the program (Docker, Docker Compose and Git).

The -d or --download option indicates the intention to download the USP Agent using git used as a template (Obuspa).

If you are going to use the command mode, you can also use these optional parameters:

  • -f file.yaml or --file file.yaml: Specify a file .yaml with the USP data model.
  • -r x or --repeat x: Repeat the creation of the USP Agent x amount of times.
sudo python3 USPython.py -m command -f test.yaml
sudo python3 USPython.py -m command -r 5

In this example:

The -f or --file will create the USP Agent using the test.yaml file instead of the default usp-data.yaml provided in the repo. The specified file must have the same structure as the usp-data.yaml.

The -r or --repeat will create five USP Agents with the same data model but with different endpoint ids. By default, the script will create the agents with the usp-data.yaml, but you can also use the -f or --file parameter.

sudo python3 USPython.py

If no arguments are provided, the script will print a usage message summarizing the available options and their usage.

Usage

  1. Run the script. You'll be presented with an interactive, menu-driven interface.
  2. Follow the prompts to install dependencies, download agents, create new agents, edit configurations, view your agent list, or delete agents.
  3. Note: Root privileges (using sudo) might be required for certain operations.

Contributing

We enthusiastically welcome contributions! To share your ideas or code improvements:

  1. Raise an Issue: File an issue to describe bugs or suggest new features.
  2. Fork & Submit a Pull Request: Follow standard GitHub workflows to propose your changes.

License

Distributed under the MIT License. See LICENSE for full details.

uspython's People

Contributors

ajsb85 avatar polarnaldo avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

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.