vaultmanager/modules/VaultManagerKV.py
def kv_generate_tree(self, vault_addr, vault_token, paths, depth):
        """
        Generate a random K/V tree under path

        :param vault_addr: Vault instance URL
        :type vault_addr: str
        :param vault_token: Vault token
        :type vault_token: str
        :param paths: List of paths under which the tree will be created
        :type paths: list(str)
        :param depth: Tree depth
        :type depth: int
        """
        if not os.path.isfile("/usr/share/dict/words"):
            raise ValueError("File '/usr/share/dict/words' containing words"
                             "doesn't exists")
        with open("/usr/share/dict/words", 'r') as fd:
            words = fd.read().splitlines()
        vault_client = self.connect_to_vault(
            vault_addr,
            vault_token
        )
        max_count = 5
        self.logger.debug("KV generate tree starting")
        for path in paths:
            self.kv_generate_tree_recursive(
                vault_client, path,
                depth, max_count, words
            )

        Generate a random K/V tree under path

        :param vault_addr: Vault instance URL
        :type vault_addr: str
        :param vault_token: Vault token
        :type vault_token: str
        :param paths: List of paths under which the tree will be created
        :type paths: list(str)
        :param depth: Tree depth
        :type depth: int
        
Generate a random K/V tree under path
Generate a random K / V tree under path
def kv_generate_tree(self, vault_addr, vault_token, paths, depth):
        if not os.path.isfile("/usr/share/dict/words"):
            raise ValueError("File '/usr/share/dict/words' containing words"
                             "doesn't exists")
        with open("/usr/share/dict/words", 'r') as fd:
            words = fd.read().splitlines()
        vault_client = self.connect_to_vault(
            vault_addr,
            vault_token
        )
        max_count = 5
        self.logger.debug("KV generate tree starting")
        for path in paths:
            self.kv_generate_tree_recursive(
                vault_client, path,
                depth, max_count, words
            )
def kv_generate_tree ( self , vault_addr , vault_token , paths , depth ) : if not os . path . isfile ( "/usr/share/dict/words" ) : raise ValueError ( "File '/usr/share/dict/words' containing words" "doesn't exists" ) with open ( "/usr/share/dict/words" , 'r' ) as fd : words = fd . read ( ) . splitlines ( ) vault_client = self . connect_to_vault ( vault_addr , vault_token ) max_count = 5 self . logger . debug ( "KV generate tree starting" ) for path in paths : self . kv_generate_tree_recursive ( vault_client , path , depth , max_count , words )
Generate a random K/V tree under path
Generate a random K / V tree under path
"""
        Generate a random K/V tree under path

        :param vault_addr: Vault instance URL
        :type vault_addr: str
        :param vault_token: Vault token
        :type vault_token: str
        :param paths: List of paths under which the tree will be created
        :type paths: list(str)
        :param depth: Tree depth
        :type depth: int
        """
self
vault_addr
Vault instance URL
Vault instance URL
vault_token
None
paths
List of paths under which the tree will be created
List of paths under which the tree will be created
depth
None