Source: pub¶
The pub
push source allows the loading of content from an instance of Pub.
Supported content types:
AMIs
VHDs
pub source URLs¶
The base form of an pub source URL is:
pub:pub-url?task_id=100[,200[,...]]
For example, referencing a single task would look like:
pub:https://pub.example.com?task_id=1234
The provided Pub URL should be the base URL of the service, and not any specific API endpoint.
Python API reference¶
- class pushsource.PubSource(url, task_id, threads=4, timeout=14400)[source]¶
Uses push item list from Pub as the source of push items.
- __init__(url, task_id, threads=4, timeout=14400)[source]¶
Create a new source.
- Parameters:
url (src) – Base URL of Pub Tool, e.g. “http://pub.example.com”, “https://pub.example.com:8123”.
task_id (int, str, list[str], list[int]) – Task ID(s) to be used as push item source. If a single string is given, multiple IDs may be comma-separated.
threads (int) – Number of threads used for concurrent queries to Pub.
timeout (int) – Number of seconds after which an error is raised, if no progress is made during queries to Pub.