コード例 #1
0
class PostInstallCmd(Cmd):
    """PostInstall Setup Cmd."""

    name = "post_install"

    def __init__(self, args: dict):
        super().__init__(args)
        self.elasticsearch = Elasticsearch(args.config)

    def process(self):
        self.elasticsearch.validate(self.name)
        rc = self.elasticsearch.post_install()
        return rc
コード例 #2
0
class ConfigCmd(Cmd):
    """Setup Config Cmd."""

    name = "config"

    def __init__(self, args):
        super().__init__(args)
        self.elasticsearch = Elasticsearch(args.config)

    def process(self):
        self.elasticsearch.validate(self.name)
        rc = self.elasticsearch.config()
        return rc