Models¶
The models returned by StarmapClient
.
APIv2¶
- class starmap_client.models.QueryResponseContainer(responses)[source]¶
Bases:
object
Represent a full query response from APIv2.
Attributes:
-
responses:
List
[QueryResponseEntity
]¶ List with all responses from a Query V2 mapping.
- classmethod from_json(json)[source]¶
Convert the APIv2 response JSON into this object.
- Parameters:
json (list) – A JSON containing a StArMap APIv2 response.
- Returns:
The converted object from JSON.
- filter_by_name(name, responses=None)[source]¶
Return a sublist of the responses with only the selected image name.
- filter_by_workflow(workflow, responses=None)[source]¶
Return a sublist of the responses with only the selected workflow.
- filter_by_cloud(cloud, responses=None)[source]¶
Return a sublist of the responses with only the selected cloud name.
-
responses:
- class starmap_client.models.QueryResponseEntity(meta, name, billing_code_config, cloud, workflow, mappings)[source]¶
Bases:
MetaMixin
,StarmapJSONDecodeMixin
Represent a single query response entity from StArMap APIv2.
Attributes:
meta()
[inherited]
-
billing_code_config:
Optional
[Dict
[str
,BillingCodeRule
]]¶ The Billing Code Configuration for the community workflow.
-
mappings:
Dict
[str
,MappingResponseObject
]¶ Dictionary with the cloud account names and MappingResponseObjects.
- property all_mappings: List[MappingResponseObject]¶
Return all
MappingResponseObject
stored inmappings
.
- class starmap_client.models.MappingResponseObject(meta, destinations, provider)[source]¶
Bases:
MetaMixin
,StarmapJSONDecodeMixin
Represent a single mapping response from
QueryResponseObject
for APIv2.Attributes:
meta()
[inherited]
-
destinations:
List
[Destination
]¶ List of destinations for the mapping response object.
- class starmap_client.models.BillingCodeRule(codes, image_name, image_types, name)[source]¶
Bases:
StarmapJSONDecodeMixin
Define a single Billing Code Configuration rule for APIv2.
Attributes:
-
image_types:
List
[BillingImageType
]¶ Image types list. Supported values are
access
andhourly
.
-
image_types:
Common¶
- class starmap_client.models.Policy(meta, id, mappings, name, workflow)[source]¶
Represent a StArMap policy.
Attributes:
id()
[inherited]meta()
[inherited]
- class starmap_client.models.Mapping(meta, id, destinations, marketplace_account, version_fnmatch, version_regexmatch)[source]¶
Represent a marketplace Mapping from Policy.
Attributes:
id()
[inherited]meta()
[inherited]
-
destinations:
List
[Destination
]¶ List of destinations for the marketplace account.
- class starmap_client.models.Destination(meta, id, architecture, destination, overwrite, restrict_version, restrict_major, restrict_minor, ami_version_template, provider, tags)[source]¶
Represent a destination entry from Mapping.
Attributes:
id()
[inherited]meta()
[inherited]
Utils¶
- class starmap_client.models.Workflow[source]¶
Define the valid workflows for StArMap.
- community = 'community'¶
Workflow
community
.
- stratosphere = 'stratosphere'¶
Workflow
stratosphere
for marketplaces.
- class starmap_client.models.BillingImageType[source]¶
Define the image type for
BillingCodeRule
for APIv2.- access = 'access'¶
Billing type
access
.
- hourly = 'hourly'¶
Billing type
hourly
.
- marketplace = 'marketplace'¶
Billing type
marketplace
.