space
konigle.managers.cloud.space
¶
Managers for BentoCloud Space resources.
AsyncSpaceManager
¶
Bases: BaseSpaceManager, BaseAsyncManager
Asynchronous manager for BentoCloud Space resources.
Example
__init__(session)
¶
Initialize the AsyncSpaceManager.
| PARAMETER | DESCRIPTION |
|---|---|
session
|
Asynchronous HTTP session.
TYPE:
|
deploy(space_id, zip_file, filename='app.zip', display_name=None)
async
¶
Upload a ZIP archive and enqueue a deployment.
| PARAMETER | DESCRIPTION |
|---|---|
space_id
|
ID of the target Space.
TYPE:
|
zip_file
|
File-like object containing the ZIP archive.
TYPE:
|
filename
|
Filename sent in the multipart request.
TYPE:
|
display_name
|
Human-readable label for the deployment.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Deployment
|
Deployment resource with an embedded job for polling. |
promote(uat_space_id)
async
¶
Promote the uat space image to production.
| PARAMETER | DESCRIPTION |
|---|---|
uat_space_id
|
ID of the uat Space to promote from.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Deployment
|
Deployment resource with an embedded job for polling. |
BaseSpaceManager
¶
Shared configuration for Space managers.
base_path = '/cloud/api/v1/spaces'
class-attribute
instance-attribute
¶
API base path for Space resources.
filter_class = SpaceFilters
class-attribute
instance-attribute
¶
Filter model class for Space list operations.
resource_class = Space
class-attribute
instance-attribute
¶
The resource model class this manager handles.
SpaceManager
¶
Bases: BaseSpaceManager, BaseSyncManager
Synchronous manager for BentoCloud Space resources.
Example
__init__(session)
¶
Initialize the SpaceManager.
| PARAMETER | DESCRIPTION |
|---|---|
session
|
Synchronous HTTP session.
TYPE:
|
deploy(space_id, zip_file, filename='app.zip', display_name=None)
¶
Upload a ZIP archive and enqueue a deployment.
| PARAMETER | DESCRIPTION |
|---|---|
space_id
|
ID of the target Space.
TYPE:
|
zip_file
|
File-like object containing the ZIP archive.
TYPE:
|
filename
|
Filename sent in the multipart request.
TYPE:
|
display_name
|
Human-readable label for the deployment.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Deployment
|
Deployment resource with an embedded job for polling. |
promote(uat_space_id)
¶
Promote the uat space image to production.
No re-upload is needed — the currently running image tag is copied directly to the paired production space.
| PARAMETER | DESCRIPTION |
|---|---|
uat_space_id
|
ID of the uat Space to promote from.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Deployment
|
Deployment resource with an embedded job for polling. |