Skip to content

alex-tw-lam/osbpy

Repository files navigation

osbpy

The Open Service Broker API defines an HTTP(S) interface between Platforms and Service Brokers.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: v2.13
  • Package version: 1.0.0
  • Generator version: 7.12.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit https://www.openservicebrokerapi.org/

Requirements.

Python 3.8+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git

(you may need to run pip with root permission: sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git)

Then import the package:

import osbpy

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import osbpy

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import osbpy
from osbpy.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to http://example.com
# See configuration.py for a list of all supported configuration parameters.
configuration = osbpy.Configuration(
    host = "http://example.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure HTTP basic authorization: basicAuth
configuration = osbpy.Configuration(
    username = os.environ["USERNAME"],
    password = os.environ["PASSWORD"]
)


# Enter a context with an instance of the API client
with osbpy.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = osbpy.CatalogApi(api_client)
    x_broker_api_version = 'x_broker_api_version_example' # str | version number of the Service Broker API that the Platform will use

    try:
        # get the catalog of services that the service broker offers
        api_response = api_instance.catalog_get(x_broker_api_version)
        print("The response of CatalogApi->catalog_get:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling CatalogApi->catalog_get: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to http://example.com

Class Method HTTP request Description
CatalogApi catalog_get GET /v2/catalog get the catalog of services that the service broker offers
ServiceBindingsApi service_binding_binding PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id} generation of a service binding
ServiceBindingsApi service_binding_unbinding DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id} deprovision of a service binding
ServiceInstancesApi service_instance_deprovision DELETE /v2/service_instances/{instance_id} deprovision a service instance
ServiceInstancesApi service_instance_last_operation_get GET /v2/service_instances/{instance_id}/last_operation last requested operation state for service instance
ServiceInstancesApi service_instance_provision PUT /v2/service_instances/{instance_id} provision a service instance
ServiceInstancesApi service_instance_update PATCH /v2/service_instances/{instance_id} update a service instance

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication

Author

open-service-broker-api@googlegroups.com

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published