Exemple #1
0
def update_tag_config(tag_config: TagConfig):
    """Persist the tag config saving the information to the mk file
    and update the current environment

    Args:
        tag_config:
            The tag config object to persist

    """
    TagConfigFile().save(tag_config.get_dict_format())
    _update_tag_dependencies()
Exemple #2
0
def update_tag_config(tag_config: TagConfig):
    """Persist the tag config saving the information to the mk file
    and update the current environment

    Args:
        tag_config:
            The tag config object to persist

    """
    if user:
        user.need_permission("wato.hosttags")
    TagConfigFile().save(tag_config.get_dict_format())
    _update_tag_dependencies()
Exemple #3
0
 def _initialize_tag_config(self):
     tag_config = TagConfig()
     tag_config.parse_config(sample_tag_config())
     TagConfigFile().save(tag_config.get_dict_format())
     # Make sure the host tag attributes are immediately declared!
     config.tags = tag_config
Exemple #4
0
 def _initialize_tag_config(self) -> None:
     tag_config = TagConfig()
     tag_config.parse_config(sample_tag_config())
     TagConfigFile().save(tag_config.get_dict_format())