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.
- 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
- Python 3.7 or later
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/your-repo/nearbyone-innovation-nbi-client.git cd nearbyone-innovation-nbi-client
-
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`
-
Install required packages:
pip install -r requirements.txt
-
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 https://nearbyone.innovationlab.nearbycomputing.com/, use
NBY_ENV_NAME=nearbyone.innovationlab
- For https://berendgort.envs.nearbycomputing.com/, use
NBY_ENV_NAME=berendgort.envs
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
- For https://nearbyone.innovationlab.nearbycomputing.com/, use
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.
-
Run the example script:
python nbi_client_examples.py
-
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:
For a comprehensive list of available methods and their parameters, please consult our API documentation.
Execute the test suite to ensure everything is functioning correctly: