This Page

Psst... hey. You're reading the latest content, but it might be out of sync with code. You can read Nova 2011.2 docs or all OpenStack docs too.

The nova.flags Module

Command-line flag library.

Wraps gflags.

Package-level global flags are defined here, the rest are defined where they’re used.

nova.flags.DECLARE(name, module_string, flag_values=<nova.flags.FlagValues instance at 0x38f47e8>)
nova.flags.DEFINE(*args, **kw)
nova.flags.DEFINE_bool(*args, **kw)
nova.flags.DEFINE_boolean(*args, **kw)
nova.flags.DEFINE_enum(*args, **kw)
nova.flags.DEFINE_flag(*args, **kw)
nova.flags.DEFINE_float(*args, **kw)
nova.flags.DEFINE_integer(*args, **kw)
nova.flags.DEFINE_list(*args, **kw)
nova.flags.DEFINE_multi_int(*args, **kw)
nova.flags.DEFINE_multistring(*args, **kw)
nova.flags.DEFINE_spaceseplist(*args, **kw)
nova.flags.DEFINE_string(*args, **kw)
class nova.flags.FlagValues(extra_context=None)

Bases: gflags.FlagValues

Extension of gflags.FlagValues that allows undefined and runtime flags.

Unknown flags will be ignored when parsing the command line, but the command line will be kept so that it can be replayed if new flags are defined after the initial parsing.

ClearDirty()
IsDirty(name)
ParseNewFlags()
Reset()
SetDirty(name)

Mark a flag as dirty so that accessing it will case a reparse.

WasAlreadyParsed()
class nova.flags.StrWrapper(context_objs)

Bases: object

Wrapper around FlagValues objects.

Wraps FlagValues objects for string.Template so that we’re sure to return strings.