signadot_sdk.api package

Submodules

signadot_sdk.api.cluster_api module

Signadot API

API for Signadot Sandboxes # noqa: E501

OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git

class signadot_sdk.api.cluster_api.ClusterApi(api_client=None)

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

connect_cluster(org_name, data, **kwargs)

Connect Cluster # noqa: E501

Connect a new Kubernetes cluster with Signadot # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_cluster(org_name, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param ConnectClusterRequest data: Request to create cluster (required) :return: ConnectClusterResponse

If the method is called asynchronously, returns the request thread.

connect_cluster_with_http_info(org_name, data, **kwargs)

Connect Cluster # noqa: E501

Connect a new Kubernetes cluster with Signadot # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.connect_cluster_with_http_info(org_name, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param ConnectClusterRequest data: Request to create cluster (required) :return: ConnectClusterResponse

If the method is called asynchronously, returns the request thread.

create_cluster_token(org_name, cluster_name, **kwargs)

Create Cluster Token # noqa: E501

Create a new token for connecting a cluster # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_cluster_token(org_name, cluster_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str cluster_name: Cluster Name (required) :return: CreateClusterTokenResponse

If the method is called asynchronously, returns the request thread.

create_cluster_token_with_http_info(org_name, cluster_name, **kwargs)

Create Cluster Token # noqa: E501

Create a new token for connecting a cluster # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_cluster_token_with_http_info(org_name, cluster_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str cluster_name: Cluster Name (required) :return: CreateClusterTokenResponse

If the method is called asynchronously, returns the request thread.

delete_cluster_token(org_name, cluster_name, token_id, **kwargs)

Delete Cluster Token # noqa: E501

Delete a cluster token associated with a cluster # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_cluster_token(org_name, cluster_name, token_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str cluster_name: Cluster Name (required) :param str token_id: Token Id (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

delete_cluster_token_with_http_info(org_name, cluster_name, token_id, **kwargs)

Delete Cluster Token # noqa: E501

Delete a cluster token associated with a cluster # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_cluster_token_with_http_info(org_name, cluster_name, token_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str cluster_name: Cluster Name (required) :param str token_id: Token Id (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

get_clusters(org_name, **kwargs)

List clusters # noqa: E501

List clusters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_clusters(org_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :return: GetClustersResponse

If the method is called asynchronously, returns the request thread.

get_clusters_with_http_info(org_name, **kwargs)

List clusters # noqa: E501

List clusters. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_clusters_with_http_info(org_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :return: GetClustersResponse

If the method is called asynchronously, returns the request thread.

signadot_sdk.api.sandboxes_api module

Signadot API

API for Signadot Sandboxes # noqa: E501

OpenAPI spec version: 1.0

Generated by: https://github.com/swagger-api/swagger-codegen.git

class signadot_sdk.api.sandboxes_api.SandboxesApi(api_client=None)

Bases: object

NOTE: This class is auto generated by the swagger code generator program.

Do not edit the class manually. Ref: https://github.com/swagger-api/swagger-codegen

create_new_sandbox(org_name, data, **kwargs)

Create a new sandbox # noqa: E501

Creates a new sandbox with the provided parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_new_sandbox(org_name, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param CreateSandboxRequest data: Request to create sandbox (required) :return: CreateSandboxResponse

If the method is called asynchronously, returns the request thread.

create_new_sandbox_with_http_info(org_name, data, **kwargs)

Create a new sandbox # noqa: E501

Creates a new sandbox with the provided parameters # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.create_new_sandbox_with_http_info(org_name, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param CreateSandboxRequest data: Request to create sandbox (required) :return: CreateSandboxResponse

If the method is called asynchronously, returns the request thread.

delete_sandbox_by_id(org_name, sandbox_id, **kwargs)

Delete a Sandbox by ID # noqa: E501

Delete the sandbox when its ID is specified # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sandbox_by_id(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

delete_sandbox_by_id_with_http_info(org_name, sandbox_id, **kwargs)

Delete a Sandbox by ID # noqa: E501

Delete the sandbox when its ID is specified # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sandbox_by_id_with_http_info(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

delete_sandbox_by_name(org_name, name, **kwargs)

Delete Sandbox By Name # noqa: E501

Delete Sandbox with given name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sandbox_by_name(org_name, name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str name: Sandbox Name to search for (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

delete_sandbox_by_name_with_http_info(org_name, name, **kwargs)

Delete Sandbox By Name # noqa: E501

Delete Sandbox with given name # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.delete_sandbox_by_name_with_http_info(org_name, name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str name: Sandbox Name to search for (required) :return: HandlerEmptyResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_by_id(org_name, sandbox_id, **kwargs)

Get a Sandbox by ID # noqa: E501

Fetch the details about a sandbox when its ID is specified # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_by_id(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: GetSandboxByIdResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_by_id_with_http_info(org_name, sandbox_id, **kwargs)

Get a Sandbox by ID # noqa: E501

Fetch the details about a sandbox when its ID is specified # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_by_id_with_http_info(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: GetSandboxByIdResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_ready(org_name, sandbox_id, **kwargs)

Check sandbox readiness # noqa: E501

Checks readiness of a sandbox with rate limiting enforced by polling. Deprecated, please use getSandboxStatusById instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_ready(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: SandboxReadyResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_ready_with_http_info(org_name, sandbox_id, **kwargs)

Check sandbox readiness # noqa: E501

Checks readiness of a sandbox with rate limiting enforced by polling. Deprecated, please use getSandboxStatusById instead. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_ready_with_http_info(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: SandboxReadyResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_status_by_id(org_name, sandbox_id, **kwargs)

Get Sandbox Status by Sandbox ID with rate limiting. # noqa: E501

Gets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_status_by_id(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: SandboxStatusResponse

If the method is called asynchronously, returns the request thread.

get_sandbox_status_by_id_with_http_info(org_name, sandbox_id, **kwargs)

Get Sandbox Status by Sandbox ID with rate limiting. # noqa: E501

Gets # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandbox_status_by_id_with_http_info(org_name, sandbox_id, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :param str sandbox_id: Sandbox ID (required) :return: SandboxStatusResponse

If the method is called asynchronously, returns the request thread.

get_sandboxes(org_name, **kwargs)

List Sandboxes # noqa: E501

List all sandboxes under the specified Signadot org. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandboxes(org_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :return: GetSandboxesResponse

If the method is called asynchronously, returns the request thread.

get_sandboxes_with_http_info(org_name, **kwargs)

List Sandboxes # noqa: E501

List all sandboxes under the specified Signadot org. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_sandboxes_with_http_info(org_name, async_req=True) >>> result = thread.get()

:param async_req bool :param str org_name: Signadot Org Name (required) :return: GetSandboxesResponse

If the method is called asynchronously, returns the request thread.

upsert_pr_workspace(github_org, github_repo, pr_number, data, **kwargs)

Create or Update workspace from Pull Request # noqa: E501

Create a workspace that is associated with a specified pull request. If no workspaces already exist for the given pull request, this creates a new workspace. Otherwise, the new changes are applied to the existing workspaces. This endpoint uses the old terminology “workspace” instead of “sandbox” for backward compatability. ### Example Here’s an example to create/update a workspace from a pull request in the [HotROD](https://github.com/signadot/hotrod) application. To simplify the use case, consider that only the [Route Service](https://github.com/signadot/hotrod/tree/main/services/route) had changes, and that the changes were published to an image file named signadot/hotrod-route and tag 4e75b0b822ecbbbb4c917b0fffeb337589d82456. This could be tagged as anything e.g. latest, e2e-test etc. As a part of workspace creation, Signadot creates forked Kubernetes workloads (such as deployments) from existing workloads using the provided images. In order to access the forked workloads(s), endpoints are specified and corresponding to each endpoint, a preview URL is generated. These preview URLs are returned as part of the response. In the example below, we’re dealing with a deployment named route in the hotrod namespace that is running the docker image signadot/hotrod-route. In the below request to create a workspace, the deployment named route is forked and the fork will be created with the new docker image tag as specified by newTag. The new deployment that is created will be running the a new docker image tag as specified by newTag. There will be a single preview URL associated with this workspace as specified in endpoints and it will point to the fork of the route deployment that was created. `json {   "cluster": "signadot",   "namespace": "hotrod",   "headCommit": "5e35abfa94626c4853eca51ecd435a779ded4123",   "images": [     {       "name": "signadot/hotrod-route",       "newTag": "4e75b0b822ecbbbb4c917b0fffeb337589d82456"     }   ],   "endpoints": [     {       "routeType": "fork",       "protocol": "http",       "forkOf": {         "kind": "Deployment",         "name": "route",         "namespace": "hotrod"       }     }   ] } ` In response the API call returns us a confirmation of the workspace created / updated along with the information on preview endpoints. `json {   "workspaceIDs": [     "xtc54uh8p2rhs"   ],   "previewEndpoints": [     {       "id": "fbm4983sxb111",       "routeType": "fork",       "name": "route",       "protocol": "http",       "clusterID": "55rjfjf3rn222",       "cluster": "signadot",       "forkOf": {         "kind": "Deployment",         "namespace": "hotrod",         "name": "route"       },       "previewURL": "https://route--hotrod-131.preview.signadot.com"     }   ] }  ` You can parse the previewEndpoints section in the response to find the previewURL associated with the endpoint created as part of the workspace. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upsert_pr_workspace(github_org, github_repo, pr_number, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str github_org: GitHub Org Name (required) :param str github_repo: GitHub Repository Name (required) :param int pr_number: Pull Request Number (required) :param UpsertPRWorkspacesRequest data: Request to upsert workspace (required) :return: UpsertWorkspaceResponse

If the method is called asynchronously, returns the request thread.

upsert_pr_workspace_with_http_info(github_org, github_repo, pr_number, data, **kwargs)

Create or Update workspace from Pull Request # noqa: E501

Create a workspace that is associated with a specified pull request. If no workspaces already exist for the given pull request, this creates a new workspace. Otherwise, the new changes are applied to the existing workspaces. This endpoint uses the old terminology “workspace” instead of “sandbox” for backward compatability. ### Example Here’s an example to create/update a workspace from a pull request in the [HotROD](https://github.com/signadot/hotrod) application. To simplify the use case, consider that only the [Route Service](https://github.com/signadot/hotrod/tree/main/services/route) had changes, and that the changes were published to an image file named signadot/hotrod-route and tag 4e75b0b822ecbbbb4c917b0fffeb337589d82456. This could be tagged as anything e.g. latest, e2e-test etc. As a part of workspace creation, Signadot creates forked Kubernetes workloads (such as deployments) from existing workloads using the provided images. In order to access the forked workloads(s), endpoints are specified and corresponding to each endpoint, a preview URL is generated. These preview URLs are returned as part of the response. In the example below, we’re dealing with a deployment named route in the hotrod namespace that is running the docker image signadot/hotrod-route. In the below request to create a workspace, the deployment named route is forked and the fork will be created with the new docker image tag as specified by newTag. The new deployment that is created will be running the a new docker image tag as specified by newTag. There will be a single preview URL associated with this workspace as specified in endpoints and it will point to the fork of the route deployment that was created. `json {   "cluster": "signadot",   "namespace": "hotrod",   "headCommit": "5e35abfa94626c4853eca51ecd435a779ded4123",   "images": [     {       "name": "signadot/hotrod-route",       "newTag": "4e75b0b822ecbbbb4c917b0fffeb337589d82456"     }   ],   "endpoints": [     {       "routeType": "fork",       "protocol": "http",       "forkOf": {         "kind": "Deployment",         "name": "route",         "namespace": "hotrod"       }     }   ] } ` In response the API call returns us a confirmation of the workspace created / updated along with the information on preview endpoints. `json {   "workspaceIDs": [     "xtc54uh8p2rhs"   ],   "previewEndpoints": [     {       "id": "fbm4983sxb111",       "routeType": "fork",       "name": "route",       "protocol": "http",       "clusterID": "55rjfjf3rn222",       "cluster": "signadot",       "forkOf": {         "kind": "Deployment",         "namespace": "hotrod",         "name": "route"       },       "previewURL": "https://route--hotrod-131.preview.signadot.com"     }   ] }  ` You can parse the previewEndpoints section in the response to find the previewURL associated with the endpoint created as part of the workspace. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.upsert_pr_workspace_with_http_info(github_org, github_repo, pr_number, data, async_req=True) >>> result = thread.get()

:param async_req bool :param str github_org: GitHub Org Name (required) :param str github_repo: GitHub Repository Name (required) :param int pr_number: Pull Request Number (required) :param UpsertPRWorkspacesRequest data: Request to upsert workspace (required) :return: UpsertWorkspaceResponse

If the method is called asynchronously, returns the request thread.

Module contents