Module Expr Str Import alias ImportFrom alias ImportFrom alias identifier ImportFrom alias ImportFrom alias Assign NameStore ListLoad Call AttributeLoad NameLoad attr Str keyword Str keyword Str Call AttributeLoad NameLoad attr Str keyword Str keyword Str Assign NameStore AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args defaults body Expr Str Assign NameStore Dict Assign NameStore Dict Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Return NameLoad If UnaryOpNot Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str NameLoad Return NameLoad Assign NameStore AttributeLoad NameLoad attr If UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Return NameLoad TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr For NameStore Call AttributeLoad NameLoad attr body If Call AttributeLoad NameLoad attr NameLoad body For TupleStore NameStore NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad ListLoad Expr Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call NameLoad Str Call NameLoad NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Dict For NameStore NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Str If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call NameLoad Assign SubscriptStore NameLoad Index NameLoad Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign NameStore Call NameLoad Return NameLoad decorator_list
N/A N/A Utility methods for scheduler solvers. N/A os.path oslo_config cfg oslo_log log logging nova.i18n _LE nova.scheduler.filters.utils * N/A rack_config_file_opts N/A N/A N/A cfg StrOpt rack_config default help The config file specifying physical rack configuration. By default Cisco's Neutron ML2 plugin config is supported, otherwise the format of the config file needs to be compatible with Cisco's Neutron ML2 plugin config file. N/A N/A cfg StrOpt rack_config_prefix default help The section name in rack config file should start with the prefix, so the config parser can recognize the section as information of a specific rack or ToR switch. For example, in Cisco's Neutron ML2 plugin config a section name like [ml2_mech_cisco_nexus:1.1.1.1] identifies a specific ToR switch, then the prefix is 'ml2_mech_cisco_nexus'. N/A CONF N/A cfg CONF N/A N/A N/A CONF register_opts rack_config_file_opts N/A LOG N/A N/A logging getLogger __name__ get_host_racks_config N/A N/A N/A N/A N/A Read the rack config file to get physical rack configurations. N/A host_racks_map N/A N/A sections N/A N/A filepath N/A CONF rack_config N/A N/A filepath N/A N/A host_racks_map N/A N/A N/A N/A N/A os path exists filepath N/A N/A N/A N/A LOG error N/A _LE The rack config file is not found: %s filepath N/A host_racks_map N/A prefix N/A CONF rack_config_prefix N/A N/A prefix N/A N/A N/A N/A LOG error N/A _LE Rack config prefix is not set. N/A host_racks_map N/A N/A N/A rack_config_parser N/A N/A cfg ConfigParser filepath sections N/A N/A N/A rack_config_parser parse N/A section_name N/A N/A sections keys N/A N/A N/A N/A section_name startswith prefix N/A N/A N/A key value N/A N/A N/A sections N/A section_name items N/A N/A N/A N/A host_racks_map setdefault key N/A set N/A N/A N/A N/A N/A host_racks_map N/A key add section_name N/A N/A N/A Exception N/A e N/A N/A N/A N/A LOG error N/A _LE The rack config file is not parsed properly: %s N/A str e N/A host_racks_map N/A get_host_racks_map N/A N/A hosts N/A N/A N/A Return a dict where keys are host names and values are names of racks
    belonging to each host. Hosts without rack config will not show up in the
    result. By default this checks host aggregate for a metadata key 'rack',
    if no such metadata key is found, it will check an external config file.
     N/A host_racks_map N/A N/A host_state hosts N/A N/A host_name N/A host_state host N/A host_racks N/A aggregate_values_from_key host_state rack N/A host_racks N/A N/A N/A N/A host_racks_map setdefault host_name N/A set N/A N/A host_racks_map N/A host_name N/A N/A N/A host_racks_map N/A host_name union host_racks N/A N/A host_racks_map N/A N/A host_racks_map N/A get_host_racks_config N/A host_racks_map N/A