From 276b7ff622c1f0f9bc01bfaf8649d66e896040c2 Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Sun, 1 Dec 2024 14:14:37 +0530 Subject: [PATCH 1/3] Initial update --- README.md | 104 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 103 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f0db190..c9f798a 100644 --- a/README.md +++ b/README.md @@ -1 +1,103 @@ -# bloxone-python-client \ No newline at end of file +# Bloxone Python Client + +This repository provides a Python Client library for interacting with Infoblox BloxOne APIs. The library is generated using the [OpenAPI Generator](https://openapi-generator.tech) project. + +The following Bloxone APIs are supported: + +## Bloxone Cloud +- [Infrastructure Management](infra_mgmt/README.md) +- [Infrastructure Provision (HostActivation API)](infra_provision/README.md) +- [Anycast Configuration Manager](anycast/README.md) +- [Upgrade Policy](upgradePolicy/README.md) + +## Bloxone Threat Defense +- [Threat Defense Cloud (FW API)](fw/README.md) +- [DNS Forwarding Proxy (DFP API)](dfp/README.md) +- [Redirect](redirect/README.md) + +## Universal DDI +- [IP Address Management](ipam/README.md) +- [DNS Configuration](dns_config/README.md) +- [DNS Data](dns_data/README.md) +- [Keys](keys/README.md) +- [Cloud Discovery Providers](cloud_discovery/README.md) +- [IPAM Federation](ipam_federation/README.md) + +## Installation + +To install the Bloxone Python Client, use the following command: + +```bash +pip install bloxone-python-client +``` + +## Usage + +> Pending + +## Configuration + +### Client Name + +The client name is used to identify the client in the logs. By default, the client name is set to `bloxone-python-client`. You can change this by creating an instance of Configuration and setting the client name. For example: + +```python +from bloxone_client import Configuration + +config = Configuration( + client_name = "my-client", +) +``` + +### Server URL + +The default URL for the Cloud Services Portal is `https://csp.infoblox.com`. If you need to change this, you can create an instance of Configuration and set the URL. For example: + +```python +from bloxone_client import Configuration + +config = Configuration( + csp_url = "https://csp.eu.infoblox.com", +) +``` + +You can also set the URL using the environment variable `BLOXONE_CSP_URL` + +### Authorization + +An API key is required to access BloxOne API. You can obtain an API key by following the instructions in the guide for [Configuring User API Keys](https://docs.infoblox.com/space/BloxOneCloud/35430405/Configuring+User+API+Keys). + +To use an API key with BloxOne API, you can create a new instance of Configuration . For example: + +```python +from bloxone_client import Configuration + +config = Configuration( + api_key = "API_KEY", +) +``` + +Alternatively, You can also set the API key using the environment variable `BLOXONE_API_KEY` + +Note: The API key is a secret and should be handled securely. Hardcoding the API key in your code is not recommended. + +### Default Tags + +The BloxOne API supports tagging resources. You can set default tags for all resources created using the client. + +To set the Default Tags , you can create a new instance of Configuration to set the tags. For example: + +```python +from bloxone_client import Configuration + +config = Configuration( + default_tags = { + "tag1": "value1", + "tag2": "value2", + } +) +``` + +## Support + +For support and inquiries, contact Infoblox Support or refer to the official [BloxOne documentation](https://csp.infoblox.com/apidoc). \ No newline at end of file From f295b9d6fd58b4bb8f360d71c2310986c62ba1b2 Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Mon, 2 Dec 2024 12:03:38 +0530 Subject: [PATCH 2/3] modify readme --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c9f798a..bcbc07e 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,32 @@ pip install bloxone-python-client ## Usage -> Pending + +To use the Bloxone Python Client, you need to import the client and create an instance of the client. For example: + +```python +from bloxone_client import ApiClient + +client = ApiClient() +``` + +Additionally , you can also add a custom config to the client. For example: + +```python +from bloxone_client import Configuration, ApiClient + +config = Configuration() + +client = ApiClient(config) +``` + +Furthermore , you can import the specific API module and use the client to interact with the API. For example: + +```python +from dns_config import ViewApi + +view_api = ViewApi(client) +``` ## Configuration From 7fac4edb99d21d7b9918051f70c9a596758c41b8 Mon Sep 17 00:00:00 2001 From: Ujjwal Nasra <125353741+unasra@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:40:09 +0530 Subject: [PATCH 3/3] addressed review comment --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bcbc07e..6c19b58 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ The following Bloxone APIs are supported: To install the Bloxone Python Client, use the following command: ```bash -pip install bloxone-python-client +pip install git+https://github.com/infobloxopen/bloxone-python-client ``` ## Usage