Skip to content

Commit

Permalink
Rename driver to molecule-proxmox
Browse files Browse the repository at this point in the history
Rename this driver from 'proxmox' to 'molecule-proxmox' so molecule will
skip the built-in schema verification and allow the driver to run.

This allows the proxmox driver to be run by a molecule version newer
than 4.0.1, which was the last version that worked before the molecule
project changed how schema validation works and broke all of the
non-core drivers.  Later, support for "custom drivers" was added in the
molecule project by treating drivers that start with 'molecule-' or
'custom-' to be considerd "custom drivers" and the build-in schema
checks are skipped.

This change means you will need to update your molecule.yml file when
upgrading from 4.0.1 to a more recent version of molecule. New molecule
files should use the 'molecule-proxmox' driver name.

For now, molecule will print a warning message, since the schema
validation is skipped. Later we should add driver specific schema
validation.
  • Loading branch information
meffie committed Jan 2, 2024
1 parent 3cc3072 commit 28ac477
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
8 changes: 4 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Example
.. code-block:: yaml
driver:
name: proxmox
name: molecule-proxmox
options:
api_host: pve01.example.com
api_user: molecule
Expand All @@ -79,7 +79,7 @@ Example
.. code-block:: yaml
driver:
name: proxmox
name: molecule-proxmox
options:
api_host: pve01.example.com
api_user: molecule
Expand All @@ -97,7 +97,7 @@ Example
.. code-block:: yaml
driver:
name: proxmox
name: molecule-proxmox
options:
# Secrets file may be encrypted with ansible-vault.
proxmox_secrets: /path/to/proxmox_secrets.yml"
Expand All @@ -112,7 +112,7 @@ Example
.. code-block:: yaml
driver:
name: proxmox
name: molecule-proxmox
options:
# Secrets file may be encrypted with ansible-vault.
proxmox_secrets: /path/to/proxmox_secrets.yml"
Expand Down
2 changes: 1 addition & 1 deletion src/molecule_proxmox/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class Proxmox(Driver):

def __init__(self, config=None):
super(Proxmox, self).__init__(config)
self._name = "proxmox"
self._name = "molecule-proxmox"

@property
def name(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/proxmox_driver/molecule/by-name/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
dependency:
name: galaxy
driver:
name: proxmox
name: molecule-proxmox
options:
# Creds file path. May be encrypted with ansible-vault.
proxmox_secrets: "${PROXMOX_SECRETS}"
Expand Down
2 changes: 1 addition & 1 deletion tests/proxmox_driver/molecule/by-vmid/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: proxmox
name: molecule-proxmox
options:
proxmox_secrets: "${PROXMOX_SECRETS}"
node: "${PROXMOX_NODE}"
Expand Down
2 changes: 1 addition & 1 deletion tests/proxmox_driver/molecule/cloud-init/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: proxmox
name: molecule-proxmox
options:
proxmox_secrets: "${PROXMOX_SECRETS}"
node: "${PROXMOX_NODE}"
Expand Down
2 changes: 1 addition & 1 deletion tests/proxmox_driver/molecule/default/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dependency:
name: galaxy

driver:
name: proxmox
name: molecule-proxmox
options:
proxmox_secrets: "${PROXMOX_SECRETS}"
node: "${PROXMOX_NODE}"
Expand Down

0 comments on commit 28ac477

Please sign in to comment.