consul-server-config-file

Description

Consul server configuration.

Variables

Name Type Default Description

path

string --

The path to the file. Required

bootstrap_expect

integer --

This flag provides the number of expected servers in the datacenter. Either this value should not be provided or the value must agree with other servers in the cluster. When provided, Consul waits until the specified number of servers are available and then bootstraps the cluster. This allows an initial leader to be elected automatically. This cannot be used in conjunction with the legacy -bootstrap flag. This flag requires -server mode.

group

string --

The group of the file.

mode

string --

The permissions of the file.

owner

string --

The owner of the file.

ui

boolean False

Enables the built-in web UI server and the required HTTP routes. This eliminates the need to maintain the Consul web UI files separately from the binary.

Code

doc:
  short_help: Consul server configuration.

args:
  bootstrap_expect:
    doc:
      short_help: This flag provides the number of expected servers in the datacenter.
      help: |
        This flag provides the number of expected servers in the datacenter. Either this value should not be provided or the value must agree with other servers in the cluster. When provided, Consul waits until the specified number of servers are available and then bootstraps the cluster. This allows an initial leader to be elected automatically. This cannot be used in conjunction with the legacy -bootstrap flag. This flag requires -server mode.
    type: integer
    required: false
  ui:
    doc:
      short_help: Enables the built-in web UI server and the required HTTP routes.
      help: |
        Enables the built-in web UI server and the required HTTP routes. This eliminates the need to maintain the Consul web UI files separately from the binary.
    type: boolean
    default: false
    required: false
    cli:
      param_decls:
      - --ui
  _import:
  - file-with-content
frecklets:
- file-with-content:
    path: '{{:: path ::}}'
    group: '{{:: group ::}}'
    owner: '{{:: owner ::}}'
    mode: '{{:: mode ::}}'
    content: |-
      server = true
      {%:: if bootstrap_expect is defined ::%}bootstrap_expect = {{:: bootstrap_expect ::}}{%:: endif ::%}
      {%:: if ui is defined ::%}ui = {%:: if ui ::%}true{%:: else ::%}false{%:: endif ::%}{%:: endif ::%}
frecklecute consul-server-config-file --help

Usage: frecklecute consul-server-config-file [OPTIONS] PATH

  Consul server configuration.

Options:
  --bootstrap-expect BOOTSTRAP_EXPECT
                                  This flag provides the number of expected
                                  servers in the datacenter.
  --group GROUP                   The group of the file.
  --mode MODE                     The permissions of the file.
  --owner USER                    The owner of the file.
  --ui                            Enables the built-in web UI server and the
                                  required HTTP routes.
  --help                          Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.consul_server_config_file.ConsulServerConfigFile
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class ConsulServerConfigFile(AutoPycklet):
    """Consul server configuration.

       Args:
         bootstrap_expect: This flag provides the number of expected servers in the datacenter.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.
         ui: Enables the built-in web UI server and the required HTTP routes.

    """

    FRECKLET_ID = "consul-server-config-file"

    bootstrap_expect: int = None
    group: str = None
    mode: str = None
    owner: str = None
    path: str = None
    ui: bool = None


    def __post_init__(self):
        super(ConsulServerConfigFile, self).__init__(var_names=["bootstrap_expect", "group", "mode", "owner", "path", "ui"])


frecklet_class = ConsulServerConfigFile
# -*- coding: utf-8 -*-


#
# module path: pycklets.consul_server_config_file.ConsulServerConfigFile
#


from pyckles import AutoPycklet

class ConsulServerConfigFile(AutoPycklet):
    """Consul server configuration.

       Args:
         bootstrap_expect: This flag provides the number of expected servers in the datacenter.
         group: The group of the file.
         mode: The permissions of the file.
         owner: The owner of the file.
         path: The path to the file.
         ui: Enables the built-in web UI server and the required HTTP routes.

    """

    FRECKLET_ID = "consul-server-config-file"

    def __init__(self, bootstrap_expect=None, group=None, mode=None, owner=None, path=None, ui=None):

        super(ConsulServerConfigFile, self).__init__(var_names=["bootstrap_expect", "group", "mode", "owner", "path", "ui"])
        self._bootstrap_expect = bootstrap_expect
        self._group = group
        self._mode = mode
        self._owner = owner
        self._path = path
        self._ui = ui

    @property
    def bootstrap_expect(self):
        return self._bootstrap_expect

    @bootstrap_expect.setter
    def bootstrap_expect(self, bootstrap_expect):
        self._bootstrap_expect = bootstrap_expect

    @property
    def group(self):
        return self._group

    @group.setter
    def group(self, group):
        self._group = group

    @property
    def mode(self):
        return self._mode

    @mode.setter
    def mode(self, mode):
        self._mode = mode

    @property
    def owner(self):
        return self._owner

    @owner.setter
    def owner(self, owner):
        self._owner = owner

    @property
    def path(self):
        return self._path

    @path.setter
    def path(self, path):
        self._path = path

    @property
    def ui(self):
        return self._ui

    @ui.setter
    def ui(self, ui):
        self._ui = ui



frecklet_class = ConsulServerConfigFile