Class: VagrantPlugins::ProviderZone::QGA::PfsenseBackend

Inherits:
BaseBackend
  • Object
show all
Defined in:
lib/vagrant-zones/qga/pfsense_backend.rb

Overview

pfSense detection only for v1; full integration via pfSsh.php playback is TODO. TODO(pfsense): implement pfSsh.php playback to apply interface settings

and reload via filter/interfaces reload.

Instance Method Summary collapse

Methods inherited from BaseBackend

#cleanup, #name, #verify

Instance Method Details

#applyObject



16
17
18
19
# File 'lib/vagrant-zones/qga/pfsense_backend.rb', line 16

def apply(*)
  raise Errors::QGABackendNotImplemented, backend: 'pfsense',
                                          details: 'pfSense network configuration via pfSsh.php is not yet implemented in vagrant-zones. Track in repository issues.'
end

#detect?(qga) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
13
14
# File 'lib/vagrant-zones/qga/pfsense_backend.rb', line 10

def detect?(qga)
  qga.exec('/bin/sh', args: ['-c', 'grep -q pfSense /etc/version 2>/dev/null'], timeout: 10)[:exitcode].zero?
rescue StandardError
  false
end