pycloudlib.vmware.cloud module
VMWare Cloud type.
- class pycloudlib.vmware.cloud.VMWare(tag: str, timestamp_suffix: bool = True, config_file: Path | StringIO | None = None, *, server=None, username=None, password=None, datacenter=None, datastore=None, folder=None, insecure_transport=None)[source]
Bases:
BaseCloudVMWare Cloud class.
- __init__(tag: str, timestamp_suffix: bool = True, config_file: Path | StringIO | None = None, *, server=None, username=None, password=None, datacenter=None, datastore=None, folder=None, insecure_transport=None)[source]
Initialize VMWare cloud class.
- Parameters:
tag – string used to name and tag resources with
timestamp_suffix – Append a timestamped suffix to the tag string.
config_file – path to pycloudlib configuration file
- daily_image(release: str, **kwargs)[source]
Return released_image for VMWare.
We’re relying on whatever has been created/uploaded, so the distinction between daily and released doesn’t make sense.
- delete_image(image_id, **kwargs)[source]
Delete an image.
- Parameters:
image_id – string, id of the image to delete
- get_instance(instance_id, **kwargs) VMWareInstance[source]
Get an instance by id.
- Parameters:
instance_id
- Returns:
An instance object to use to manipulate the instance further.
- image_serial(image_id)[source]
Find the image serial of the latest daily image for a release.
- Parameters:
image_id – string, Ubuntu image id
- Returns:
string, serial of latest image
- launch(image_id: str, instance_type=None, user_data=None, **kwargs) VMWareInstance[source]
Launch an instance.
- Parameters:
image_id – string, image ID to use for the instance
instance_type – string, type of instance to create
user_data – used by cloud-init to run custom scripts/configuration
wait – wait for instance to be live
**kwargs – dictionary of other arguments to pass to launch
- Returns:
An instance object to use to manipulate the instance further.