File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/__pycache__/virtualbox.cpython-310.pyc
Back
o ;j1 � @ s� d Z ddlZddlmZ ddlmZ zddlZddlmZm Z m Z mZmZm Z mZmZmZ dZW n ey; dZY nw e�e�ZdZdZdd � Zd d� Zdd � Zdd� Zdd� Zd dd�Zd dd�Zd!dd�Zd!dd�Z d!dd�Z!d!dd�Z"d!dd�Z#dS )"a� A salt cloud provider that lets you use virtualbox on your machine and act as a cloud. :depends: vboxapi For now this will only clone existing VMs. It's best to create a template from which we will clone. Followed https://docs.saltproject.io/en/latest/topics/cloud/cloud.html#non-libcloud-based-modules to create this. Dicts provided by salt: __opts__ : contains the options used to run Salt Cloud, as well as a set of configuration and environment variables � N)�SaltCloudSystemExit) �treat_machine_dict�vb_clone_vm�vb_destroy_machine�vb_get_machine�vb_list_machines�vb_machine_exists�vb_start_vm� vb_stop_vm�vb_wait_for_network_addressTF� virtualboxc C s t sdS t� du rdS tS )a� This function determines whether or not to make this cloud module available upon execution. Most often, it uses get_configured_provider() to determine if the necessary configuration has been set up. It may also check for necessary imports decide whether to load the module. In most cases, it will return a True or False value. If the name of the driver used does not match the filename, then that name should be returned instead of True. @return True|False|str )FzCThe virtualbox driver cannot be loaded: 'vboxapi' is not installed.F)FzPThe virtualbox driver cannot be loaded: 'virtualbox' provider is not configured.)�HAS_VBOX�get_configured_provider�__virtualname__� r r �P/opt/saltstack/salt/lib/python3.10/site-packages/salt/cloud/clouds/virtualbox.py�__virtual__5 s r c C s"