Skip to content

The NBI Client is a Python library for interacting with the NBI Service Orchestration API. It simplifies managing service chains across cloud and edge environments, supporting secure authentication, organization management, infrastructure operations, and service deployment with ease.

Notifications You must be signed in to change notification settings

nbycomp/inno-nbi-service-orchestration-api-client

Repository files navigation

NearbyOne Logo

NearbyOne Innovation NBI Client

Overview

The NearbyOne Innovation NBI (North-Bound Interface) Client is a robust Python library designed to streamline interactions with the NearbyOne Innovation NBI Service Orchestration API. This client facilitates efficient management of service chains across cloud and edge computing environments, providing a seamless interface for deployment, management, and updates.

Key Features

  • Secure Authentication: Integrated Kratos authentication system
  • Organization Management: Comprehensive tools for managing organizational structures
  • Infrastructure Operations: Efficient handling of infrastructure-related tasks
  • Marketplace Integration: Seamless interaction with the NearbyOne marketplace
  • Service Lifecycle Management: Full suite of tools for deploying, updating, and managing services

Installation

Prerequisites

  • Python 3.7 or later
  • pip (Python package manager)

Steps

  1. Clone the repository:

    git clone https://github.com/your-repo/nearbyone-innovation-nbi-client.git
    cd nearbyone-innovation-nbi-client
    
  2. Create and activate a virtual environment:

    python3 -m venv venv-nbi-client
    source venv-nbi-client/bin/activate  # On Windows use `venv-nbi-client\Scripts\activate`
    
  3. Install required packages:

    pip install -r requirements.txt
    

Environment Setup

  1. Configure environment variables: Create a .env file in the project root and add the following:

    [email protected]
    NBY_ENV_PASSWORD=your-password
    NBY_ORGANIZATION_ID=your-org-id
    NBY_ENV_NAME=your-env-name
    

    Replace placeholders with your actual credentials and information.

    For NBY_ENV_NAME, use everything before .nearbycomputing.com in your environment URL.

    Examples:

    For NBY_ORGANIZATION_ID, follow these steps (screenshot below):

    • Go to the right organization (top-right bar of the page)
    • Click on the left pane on 'Infrastrucure'
    • Click on the left side again on your 'Organization'
    • Copy the ID string from the Organization Page Overview

    image (1)

Quick Start Guide

For a comprehensive example of how to use the NearbyOne Innovation NBI Client, refer to the nbi_client_examples.py file in the project root. This script demonstrates various API calls and can be run directly without any specific parameters.

  1. Run the example script:

    python nbi_client_examples.py
    
  2. The script will guide you through various API calls, including:

    • Fetching organizations
    • Getting site and device details
    • Listing marketplace charts
    • Deploying a service
    • Updating service node ports
    • Deleting a service

For a sample output of what to expect when running the script, refer to nbi_client_examples_output.txt in the project root. This file shows the typical responses you should receive from the API calls.

For more detailed usage, you can refer to the following sections of the nbi_client_examples.py file:

API Reference

For a comprehensive list of available methods and their parameters, please consult our API documentation.

Running Tests

Execute the test suite to ensure everything is functioning correctly:

About

The NBI Client is a Python library for interacting with the NBI Service Orchestration API. It simplifies managing service chains across cloud and edge environments, supporting secure authentication, organization management, infrastructure operations, and service deployment with ease.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published