Пример #1
0
class PostUpgradeCmd(Cmd):
    """Post Upgrade Setup Cmd."""
    name = "postupgrade"

    def __init__(self, args):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.postupgrade()
Пример #2
0
class PrepareCmd(Cmd):
    """Prepare Setup Cmd."""
    name = "prepare"

    def __init__(self, args: dict):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.validate(self.name)
        self.consul.prepare()
Пример #3
0
class PostInstallCmd(Cmd):
    """PostInstall Setup Cmd."""
    name = "post_install"

    def __init__(self, args: dict):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.validate(self.name)
        self.consul.post_install()
Пример #4
0
class TestCmd(Cmd):
    """Test Setup Cmd."""
    name = "test"

    def __init__(self, args):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.validate(self.name)
        self.consul.test()
Пример #5
0
class ResetCmd(Cmd):
    """Reset Setup Cmd."""
    name = "reset"

    def __init__(self, args):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.validate(self.name)
        self.consul.reset()
Пример #6
0
class ConfigCmd(Cmd):
    """Setup Config Cmd."""
    name = "config"

    def __init__(self, args):
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        self.consul.validate(self.name)
        self.consul.config()
Пример #7
0
class PreUpgradeCmd(Cmd):
    """Pre Upgrade Setup Cmd."""

    name = "preupgrade"

    def __init__(self, args):
        """Preupgrade cmd."""
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        """Process cmd."""
        self.consul.preupgrade()
Пример #8
0
class InitCmd(Cmd):
    """Init Setup Cmd."""

    name = "init"

    def __init__(self, args):
        """Init cmd."""
        super().__init__(args)
        self.consul = Consul(args.config)

    def process(self):
        """Process cmd."""
        self.consul.validate(self.name)
        self.consul.init()
Пример #9
0
class CleanupCmd(Cmd):
    """Cleanup Setup Cmd."""
    name = "cleanup"

    @staticmethod
    def _add_extended_args(parser):
        parser.add_argument('--pre-factory',
                            action="store_true",
                            help='Factory cleanup.')

    def __init__(self, args):
        super().__init__(args)
        self.consul = Consul(args.config)
        self.pre_factory = args.pre_factory

    def process(self):
        self.consul.validate(self.name)
        self.consul.cleanup(self.pre_factory)
Пример #10
0
 def __init__(self, args: dict):
     super().__init__(args)
     self.consul = Consul(args.config)
Пример #11
0
 def __init__(self, args):
     super().__init__(args)
     self.consul = Consul(args.config)
     self.pre_factory = args.pre_factory
Пример #12
0
 def __init__(self, args: dict):
     """Post Install cmd."""
     super().__init__(args)
     self.consul = Consul(args.config)
Пример #13
0
 def __init__(self, args):
     """Postupgrade cmd."""
     super().__init__(args)
     self.consul = Consul(args.config)
Пример #14
0
 def __init__(self, args):
     """Cleanup cmd."""
     super().__init__(args)
     self.consul = Consul(args.config)
     self.pre_factory = args.pre_factory
Пример #15
0
 def __init__(self, args):
     """Reset cmd."""
     super().__init__(args)
     self.consul = Consul(args.config)