add ability to specify the mounts since the default policy doesn't expose them except for via the UI.

This commit is contained in:
2020-03-30 01:59:36 -04:00
parent 7e839f7058
commit 731e0b4ce8
4 changed files with 70 additions and 10 deletions

View File

@@ -13,12 +13,14 @@ class PassMan(object):
client = None
auth = None
uri = None
mount = None
def __init__(self, cfg = '~/.config/vaultpass.xml'):
self.cfg = config.getConfig(cfg)
self._getURI()
self.getClient()
self._checkSeal()
self._getMount()
def _checkSeal(self):
_logger.debug('Checking and attempting unseal if necessary and possible.')
@@ -38,6 +40,10 @@ class PassMan(object):
raise RuntimeError('Unable to unseal')
return(None)
def _getMount(self):
# TODO: mounts xml?
self.mount = mounts.MountHandler(self.client)
def _getURI(self):
uri = self.cfg.xml.find('.//uri')
if uri is None: