import pyparsing as pyp
from ganeti import errors
-from ganeti import netutils
from ganeti import utils
from ganeti import compat
" '%s': %s" % (text, err), err)
-def _IsHostname(text):
- """Checks if a string could be a hostname.
-
- @rtype: bool
-
- """
- try:
- netutils.Hostname.GetNormalizedName(text)
- except errors.OpPrereqError:
- return False
- else:
- return True
-
-
def _CheckFilter(text):
"""CHecks if a string could be a filter.