Access the Bumblebee Networks Controller API and define account, endpoint node, service node, app service, endpoint, and user classes.
Project description
Bumblebee Networks SDK
Purpose:
- This is a Python package that simplifies interaction with the Bumblebee Networks controller API by streamlining the steps of making API requests and handling responses.
Directory Details:
- /src
- account.py - initializes a class representing an account
- app_service.py - initializes a class representing an app service
- ep.py - initializes a class representing an endpoint
- service_node.py - initializes a class representing a service node
- user.py - initializes a class representing a user
- bbt.py - defines an object that accesses the controller API to translate method calls into HTTP requests and procceses responses
- /test
- account_bbt_test.py - tests account-related GET operations of the API when accessed through the SDK
- GET operations tested: get_account
- app_service_bbt_test.py - tests app service-related GET operations of the API when accessed through the SDK
- GET operations tested: get_app_service, get_app_service_detail, get_app_service_hosting
- ep_bbt_test.py - tests endpoint and endpoint node-related GET operations of the API when accessed through the SDK
- GET operations tested: get_ep_node_groups, get_ep_nodes, get_endpoint_node_detail, get_eps, get_endpoint_detail
- service_node_bbt_test.py - tests service node-related GET operations of the API when accessed through the SDK
- GET operations tested: get_service_node, get_service_node_detail
- account_bbt_test.py - tests account-related GET operations of the API when accessed through the SDK
Getting Started:
Installation/Setup Steps:
- Set up and activate your virtual environment
- On macOS/Linux:
- python3 -m venv
- source venv/bin/activate
- On Windows:
- python -m venv venv
- venv\Scripts\activate
- On macOS/Linux:
- Install the package using pip
- pip install bumblebee-sdk-test
- Install the required packages listed in requirements.txt: pip install -r requirements.txt
- Configure your env variables by creating an .env file in the root directory and listing your login information as following:
- username="your-email"
- password="your-password"
- Import the required classes/methods
- import bbt
The bbt class
The bbt class is used to simplify interactions with the Bumblebee Networks controller API by providing methods that manage accounts, IAM users, SAML SSO, service node groups, service nodes, app services, endpoint node groups, endpoint nodes, endpoints, user agents. It also provides methods to manage the database, get messages, download OVA files, get stats, billing, and contact information.
Example GET Methods
First import bbt and create an instance of the bbt class
from bbt import *
bt = get_bt(api_url=api_url, access_key_id=username, access_key_secret=password)
- Account methods
accounts, error_msg = bt.get_account(username=username)
assert error_msg == None, f"Account get failed, error = {error_msg}"
for act in accounts:
print("\nAccount Information: ", act.to_dict())
- Service node groups methods
service_node_group, error_msg = bt.get_service_node_groups("PCpractice")
assert error_msg == None, f"Account IdP get failed, error = {error_msg}"
for sng_data in service_node_group:
print("\nService Node Group: ", sng_data.to_dict())
- Service node methods
service_node, error_msg = bt.get_service_node("sng-194230442600549", "PCpractice")
assert error_msg == None, f"Service node get failed, error = {error_msg}"
for sn_data in service_node:
print("\nService Node: ", sn_data.to_dict())
- App service methods
app_service, error_msg = bt.get_app_service("PCpractice")
assert error_msg == None, f"App service get failed, error = {error_msg}"
for as_data in app_service:
print("\nApp Service: ", as_data.to_dict())
app_service_detail, error_msg = bt.get_app_service_detail("app-107527704987863")
assert error_msg == None, f"App service details get failed, error = {error_msg}"
print("\nApp Service Details: ", app_service_detail)
app_service_hosting, error_msg = bt.get_app_service_hosting(app_service_id='app-107527704987863', hosting_type='onprem')
assert error_msg == None, f"App service hosting get failed, error = {error_msg}"
print("\nApp Service Hosting: ", app_service_hosting)
- Endpoint node groups methods
ep_node_group, error_msg = bt.get_ep_node_groups("practice")
assert error_msg == None, f"Endpoint node groups get failed, error = {error_msg}"
for epng_data in ep_node_group:
print("\nEndpoint Node Group: ", epng_data.to_dict())
- Endpoint node methods
ep_node, error_msg = bt.get_ep_nodes("epng-209808940081286", "practice")
assert error_msg == None, f"Endpoint node get failed, error = {error_msg}"
for epn_data in ep_node:
print("\nEndpoint Node: ", epn_data.to_dict())
ep_node_detail, error_msg = bt.get_endpoint_node_detail("epn-54162734144921")
assert error_msg == None, f"Endpoint node details get failed, error = {error_msg}"
print("\nEndpoint Node Details: ", ep_node_detail)
- Endpoint methods
ep, error_msg = bt.get_eps("app-107527704987863", "epn-228936703715895", "test-ep")
assert error_msg == None, f"Endpoints get failed, error = {error_msg}"
for ep_data in ep:
print("\nEndpoint: ", ep_data.to_dict())
ep_detail, error_msg = bt.get_endpoint_detail("ep-127856265075043")
assert error_msg == None, f"Endpoint details get failed, error = {error_msg}"
print("\nEndpoint Details: ", ep_detail)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bumblebee_sdk_test-1.0.2.tar.gz.
File metadata
- Download URL: bumblebee_sdk_test-1.0.2.tar.gz
- Upload date:
- Size: 14.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcda2b69dde99ef744f17704f635f3808ce5551aa3c165b4391d45e4defe9860
|
|
| MD5 |
b35c9f1b87e018ab8727d86025445348
|
|
| BLAKE2b-256 |
3bcb45cc47d406c2b8619849b1429325d8a139b5da0bde026fce0e1864b71466
|
File details
Details for the file bumblebee_sdk_test-1.0.2-py3-none-any.whl.
File metadata
- Download URL: bumblebee_sdk_test-1.0.2-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cc71ac1fea43463b1630cc715a581b70c9843685d3994c1328785a50c5a5b6a
|
|
| MD5 |
61a9032216a3bf593a34ee768878d7a2
|
|
| BLAKE2b-256 |
000c572c9be6412295d393fefde18ca576bdf251ef9048a38d5ec45e0b020c9c
|