示例#1
0
    def __init__(self):
        super(HashiVaultPlugin, self).__init__()

        self.helper = HashiVaultHelper()
        self._options_adapter = HashiVaultOptionAdapter.from_ansible_plugin(
            self)
        self.connection_options = HashiVaultConnectionOptions(
            self._options_adapter)
    def __init__(self):
        super(HashiVaultPlugin, self).__init__()

        self.helper = HashiVaultHelper()
        self._options_adapter = HashiVaultOptionAdapter.from_ansible_plugin(
            self)
        self.connection_options = HashiVaultConnectionOptions(
            self._options_adapter, self._generate_retry_callback)
        self.authenticator = HashiVaultAuthenticator(self._options_adapter,
                                                     display.warning)
    def __init__(self, *args, **kwargs):
        if 'hashi_vault_custom_retry_callback' in kwargs:
            callback = kwargs.pop('hashi_vault_custom_retry_callback')
        else:
            callback = self._generate_retry_callback

        super(HashiVaultModule, self).__init__(*args, **kwargs)

        self.helper = HashiVaultHelper()
        self.adapter = HashiVaultOptionAdapter.from_dict(self.params)
        self.connection_options = HashiVaultConnectionOptions(
            option_adapter=self.adapter, retry_callback_generator=callback)
        self.authenticator = HashiVaultAuthenticator(
            option_adapter=self.adapter, warning_callback=self.warn)
def adapter(option_dict):
    return HashiVaultOptionAdapter.from_dict(option_dict)
 def _create_adapter_from_dict_defaults():
     return HashiVaultOptionAdapter(getter=sample_dict.__getitem__,
                                    setter=sample_dict.__setitem__)
 def _create_adapter_from_dict():
     return HashiVaultOptionAdapter.from_dict(sample_dict)
def adapter(preread_options):
    return HashiVaultOptionAdapter.from_dict(preread_options)
 def _create_adapter_from_ansible_plugin():
     return HashiVaultOptionAdapter.from_ansible_plugin(ansible_plugin)