Class: VagrantPlugins::ProviderZone::QGA::OpnsenseBackend
- Inherits:
-
BaseBackend
- Object
- BaseBackend
- VagrantPlugins::ProviderZone::QGA::OpnsenseBackend
- Defined in:
- lib/vagrant-zones/qga/opnsense_backend.rb
Overview
OPNsense detection only for v1; full integration via configctl + config.xml XPath is TODO. TODO(opnsense): implement configctl + /conf/config.xml XPath editing,
then run `configctl interface reconfigure all`.
Constant Summary collapse
- OPNSENSE_VERSION_DIR =
'/usr/local/opnsense/version'
Instance Method Summary collapse
Methods inherited from BaseBackend
Instance Method Details
#apply ⇒ Object
18 19 20 21 |
# File 'lib/vagrant-zones/qga/opnsense_backend.rb', line 18 def apply(*) raise Errors::QGABackendNotImplemented, backend: 'opnsense', details: 'OPNsense network configuration via configctl + config.xml is not yet implemented in vagrant-zones. Track in repository issues.' end |
#detect?(qga) ⇒ Boolean
12 13 14 15 16 |
# File 'lib/vagrant-zones/qga/opnsense_backend.rb', line 12 def detect?(qga) qga.exec('/usr/bin/test', args: ['-d', OPNSENSE_VERSION_DIR], timeout: 10)[:exitcode].zero? rescue StandardError false end |