vaultmanager/modules/VaultManagerKV.py
def initialize_subparser(self, subparsers):
        """
        Add the subparser of this specific module to the list of all subparsers

        :param subparsers: list of all subparsers
        :type subparsers: argparse.ArgumentParser.add_subparsers()
        :return:
        """
        self.logger.debug("Initializing subparser")
        self.module_name = \
            self.__class__.__name__.replace("VaultManager", "").lower()
        self.subparser = subparsers.add_parser(
            self.module_name, help=self.module_name + ' management'
        )
        self.subparser.add_argument("--copy-path", nargs=2,
                                    help="""copy kv store from specified path
                                    COPY_FROM_PATH from vault-addr instance
                                    to vault-target-addr at path COPY_TO_PATH.
                                    vault-token is used for vault-addr and
                                    vault-target-token is used for
                                    vault-target-addr""",
                                    metavar=("COPY_FROM_PATH", "COPY_TO_PATH"))
        self.subparser.add_argument("--copy-secret", nargs=2,
                                    help="""copy one secret from vault-addr
                                    instance at SECRET_TO_COPY to
                                    vault-target-addr at SECRET_TARGET""",
                                    metavar=("SECRET_TO_COPY", "SECRET_TARGET"))
        self.subparser.add_argument("--delete", nargs='+',
                                    help="""delete PATH_TO_DELETE and all
                                    secrets under it from vault-addr instance.
                                    vault-token is used for vault-addr""",
                                    metavar="PATHS_TO_DELETE")
        self.subparser.add_argument("--count", nargs='+',
                                    help="""count all secrets on vault-addr
                                    instance under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--find-duplicates", nargs='+',
                                    help="""search and display duplicates on
                                    vault-addr instance under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--secrets-tree", nargs='+',
                                    help="""display all secrets tree
                                    (path/to/secret) on vault-addr instance
                                     under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--search", nargs='+',
                                    help="""try to find all SEARCH_VALUES
                                    on vault-addr instance whether it's a
                                    path or a secret""",
                                    metavar="SEARCH_VALUES")
        self.subparser.add_argument("-e", "--exclude", nargs='+',
                                    help="""paths to excludes from count,
                                    find-duplicates, secrets-tree or search""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("-i", "--include", nargs='+',
                                    help="""paths to include in search""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--generate-tree", nargs='+',
                                    help="""paths under which will be
                                    generated a random secrets tree""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--depth", nargs='?',
                                    help="""depth of tree generated by
                                    generate-tree""",
                                    metavar="DEPTH", type=int)
        self.subparser.set_defaults(module_name=self.module_name)

        Add the subparser of this specific module to the list of all subparsers

        :param subparsers: list of all subparsers
        :type subparsers: argparse.ArgumentParser.add_subparsers()
        :return:
        
Add the subparser of this specific module to the list of all subparsers
Add the subparser of this specific module to the list of all subparsers
def initialize_subparser(self, subparsers):
        self.logger.debug("Initializing subparser")
        self.module_name = \
            self.__class__.__name__.replace("VaultManager", "").lower()
        self.subparser = subparsers.add_parser(
            self.module_name, help=self.module_name + ' management'
        )
        self.subparser.add_argument("--copy-path", nargs=2,
                                    help="""copy kv store from specified path
                                    COPY_FROM_PATH from vault-addr instance
                                    to vault-target-addr at path COPY_TO_PATH.
                                    vault-token is used for vault-addr and
                                    vault-target-token is used for
                                    vault-target-addr""",
                                    metavar=("COPY_FROM_PATH", "COPY_TO_PATH"))
        self.subparser.add_argument("--copy-secret", nargs=2,
                                    help="""copy one secret from vault-addr
                                    instance at SECRET_TO_COPY to
                                    vault-target-addr at SECRET_TARGET""",
                                    metavar=("SECRET_TO_COPY", "SECRET_TARGET"))
        self.subparser.add_argument("--delete", nargs='+',
                                    help="""delete PATH_TO_DELETE and all
                                    secrets under it from vault-addr instance.
                                    vault-token is used for vault-addr""",
                                    metavar="PATHS_TO_DELETE")
        self.subparser.add_argument("--count", nargs='+',
                                    help="""count all secrets on vault-addr
                                    instance under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--find-duplicates", nargs='+',
                                    help="""search and display duplicates on
                                    vault-addr instance under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--secrets-tree", nargs='+',
                                    help="""display all secrets tree
                                    (path/to/secret) on vault-addr instance
                                     under SECRET_PATHS""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--search", nargs='+',
                                    help="""try to find all SEARCH_VALUES
                                    on vault-addr instance whether it's a
                                    path or a secret""",
                                    metavar="SEARCH_VALUES")
        self.subparser.add_argument("-e", "--exclude", nargs='+',
                                    help="""paths to excludes from count,
                                    find-duplicates, secrets-tree or search""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("-i", "--include", nargs='+',
                                    help="""paths to include in search""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--generate-tree", nargs='+',
                                    help="""paths under which will be
                                    generated a random secrets tree""",
                                    metavar="SECRET_PATHS")
        self.subparser.add_argument("--depth", nargs='?',
                                    help="""depth of tree generated by
                                    generate-tree""",
                                    metavar="DEPTH", type=int)
        self.subparser.set_defaults(module_name=self.module_name)
def initialize_subparser ( self , subparsers ) : self . logger . debug ( "Initializing subparser" ) self . module_name = self . __class__ . __name__ . replace ( "VaultManager" , "" ) . lower ( ) self . subparser = subparsers . add_parser ( self . module_name , help = self . module_name + ' management' ) self . subparser . add_argument ( "--copy-path" , nargs = 2 , help = """copy kv store from specified path
                                    COPY_FROM_PATH from vault-addr instance
                                    to vault-target-addr at path COPY_TO_PATH.
                                    vault-token is used for vault-addr and
                                    vault-target-token is used for
                                    vault-target-addr""" , metavar = ( "COPY_FROM_PATH" , "COPY_TO_PATH" ) ) self . subparser . add_argument ( "--copy-secret" , nargs = 2 , help = """copy one secret from vault-addr
                                    instance at SECRET_TO_COPY to
                                    vault-target-addr at SECRET_TARGET""" , metavar = ( "SECRET_TO_COPY" , "SECRET_TARGET" ) ) self . subparser . add_argument ( "--delete" , nargs = '+' , help = """delete PATH_TO_DELETE and all
                                    secrets under it from vault-addr instance.
                                    vault-token is used for vault-addr""" , metavar = "PATHS_TO_DELETE" ) self . subparser . add_argument ( "--count" , nargs = '+' , help = """count all secrets on vault-addr
                                    instance under SECRET_PATHS""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "--find-duplicates" , nargs = '+' , help = """search and display duplicates on
                                    vault-addr instance under SECRET_PATHS""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "--secrets-tree" , nargs = '+' , help = """display all secrets tree
                                    (path/to/secret) on vault-addr instance
                                     under SECRET_PATHS""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "--search" , nargs = '+' , help = """try to find all SEARCH_VALUES
                                    on vault-addr instance whether it's a
                                    path or a secret""" , metavar = "SEARCH_VALUES" ) self . subparser . add_argument ( "-e" , "--exclude" , nargs = '+' , help = """paths to excludes from count,
                                    find-duplicates, secrets-tree or search""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "-i" , "--include" , nargs = '+' , help = """paths to include in search""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "--generate-tree" , nargs = '+' , help = """paths under which will be
                                    generated a random secrets tree""" , metavar = "SECRET_PATHS" ) self . subparser . add_argument ( "--depth" , nargs = '?' , help = """depth of tree generated by
                                    generate-tree""" , metavar = "DEPTH" , type = int ) self . subparser . set_defaults ( module_name = self . module_name )
Add the subparser of this specific module to the list of all subparsers
Add the subparser of this specific module to the list of all subparsers
"""
        Add the subparser of this specific module to the list of all subparsers

        :param subparsers: list of all subparsers
        :type subparsers: argparse.ArgumentParser.add_subparsers()
        :return:
        """
None
self
subparsers
list of all subparsers
list of all subparsers