ganeti
Safe HaskellNone

Ganeti.HTools.Tags

Description

Tags

This module holds all the tag interpretation done by htools.

Synopsis

Predicates

hasStandbyTag :: Node -> Bool Source #

Predicate of having a standby tag.

Utility functions

getTags :: String -> [String] -> [String] -> Set String Source #

Htools standard tag extraction. Given a set of cluster tags, take those starting with a specific prefix, strip the prefix and append a colon, and then take those node tags starting with one of those strings.

Migration restriction tags

getMigRestrictions :: [String] -> [String] -> Set String Source #

Given the cluster tags extract the migration restrictions from a node tag.

splitAtColons :: String -> Maybe (String, String) Source #

Maybe split a string on the first single occurence of "::" return the parts before and after.

migrations :: [String] -> [(String, String)] Source #

Get the pairs of allowed migrations from a set of cluster tags.

getRecvMigRestrictions :: [String] -> [String] -> Set String Source #

Given the cluster tags, extract the set of migration restrictions a node is able to receive from its node tags.

Location tags

getLocations :: [String] -> [String] -> Set String Source #

Given the cluster tags, extract the node location tags from the node tags.