Module Import alias ImportFrom alias ImportFrom alias identifier Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad ClassDef bases NameLoad body Expr Str Assign NameStore ListLoad Str Str Str Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Call AttributeLoad Call NameLoad NameLoad NameLoad attr Assign AttributeStore NameLoad attr IfExp NameLoad ListComp Call AttributeLoad NameLoad attr comprehension NameStore NameLoad ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign AttributeStore NameLoad attr BoolOpOr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Return Call NameLoad GeneratorExp CompareEq Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str For NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Delete SubscriptDel NameLoad Index Str Delete SubscriptDel NameLoad Index Str If BoolOpAnd CompareEq Call NameLoad Call AttributeLoad NameLoad attr Call NameLoad Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Call AttributeLoad NameLoad attr body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If UnaryOpNot NameLoad body Return Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore DictComp NameLoad Call NameLoad NameLoad NameLoad comprehension NameStore AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Assign SubscriptStore NameLoad Index Str Num Assign SubscriptStore NameLoad Index Str ListLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr keyword Lambda arguments args NameParam defaults Call NameLoad NameLoad Assign NameStore NameLoad AugAssignAdd SubscriptStore NameLoad Index Str Num Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num body Expr Str If CompareGt SubscriptLoad NameLoad Index Str NameLoad body AugAssignSub SubscriptStore NameLoad Index Str NameLoad Assign NameStore Num orelse AugAssignSub NameStore SubscriptLoad NameLoad Index Str Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Raise Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad SubscriptLoad NameLoad Index Str attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Str Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareLt Call NameLoad ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Str For NameStore Call NameLoad Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Return NameLoad For NameStore NameLoad body If CompareGtE SubscriptLoad NameLoad Index Str NameLoad body Assign NameStore NameLoad orelse Assign NameStore SubscriptLoad NameLoad Index Str AugAssignSub NameStore NameLoad AugAssignSub SubscriptStore NameLoad Index Str NameLoad For NameStore Call NameLoad NameLoad body Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index Str attr Expr Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad Num body Break Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse If CompareEq AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If CompareIn NameLoad Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type AttributeLoad NameLoad attr body Return decorator_list FunctionDef arguments args NameParam NameParam defaults body Return ListComp NameLoad comprehension NameStore NameLoad Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Assign NameStore BinOpAdd ListLoad NameLoad ListComp AttributeLoad NameLoad attr comprehension NameStore NameLoad Return ListComp NameLoad comprehension NameStore NameLoad Call NameLoad GeneratorExp Call AttributeLoad NameLoad attr NameLoad ListLoad Dict Str NameLoad comprehension NameStore NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults body If Call NameLoad GeneratorExp CompareNotEq Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr comprehension NameStore AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Return ListComp NameLoad comprehension NameStore NameLoad UnaryOpNot CompareEq Call AttributeLoad NameLoad attr Str AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareLt Call NameLoad ListComp SubscriptLoad NameLoad Index Str comprehension NameStore NameLoad NameLoad body Return NameLoad orelse For NameStore NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Break Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Return Call NameLoad ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If UnaryOpNot Call NameLoad ListComp Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad body Raise Call AttributeLoad NameLoad attr keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore ListLoad For NameStore AttributeLoad NameLoad attr body Assign NameStore DictComp NameLoad NameLoad comprehension TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad CompareNotEq NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareEq Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot CompareEq NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore ListComp NameLoad comprehension NameStore NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list
N/A N/A copy oslo_config cfg oslo_log log logging N/A six nova exception nova.i18n _LE nova objects nova.objects fields nova.objects pci_device_pool nova.pci utils nova.pci whitelist N/A CONF N/A cfg CONF N/A LOG N/A N/A logging getLogger __name__ PciDeviceStats N/A object N/A N/A PCI devices summary information.

    According to the PCI SR-IOV spec, a PCI physical function can have up to
    256 PCI virtual functions, thus the number of assignable PCI functions in
    a cloud can be big. The scheduler needs to know all device availability
    information in order to determine which compute hosts can support a PCI
    request. Passing individual virtual device information to the scheduler
    does not scale, so we provide summary information.

    Usually the virtual functions provided by a host PCI device have the same
    value for most properties, like vendor_id, product_id and class type.
    The PCI stats class summarizes this information for the scheduler.

    The pci stats information is maintained exclusively by compute node
    resource tracker and updated to database. The scheduler fetches the
    information and selects the compute node accordingly. If a compute
    node is selected, the resource tracker allocates the devices to the
    instance and updates the pci stats information.

    This summary information will be helpful for cloud management also.
     N/A pool_keys N/A product_id vendor_id numa_node dev_type __init__ N/A N/A self stats dev_filter N/A None None N/A N/A N/A N/A N/A super PciDeviceStats self __init__ N/A N/A self pools N/A stats N/A N/A N/A pci_pool to_dict N/A pci_pool stats N/A N/A N/A N/A N/A self pools sort key N/A N/A N/A item N/A N/A len item N/A N/A self dev_filter N/A dev_filter N/A N/A whitelist Whitelist N/A CONF pci_passthrough_whitelist N/A _equal_properties N/A N/A self dev entry matching_keys N/A N/A N/A N/A all N/A N/A N/A N/A dev get prop N/A N/A entry get prop N/A prop matching_keys N/A _find_pool N/A N/A self dev_pool N/A N/A N/A Return the first pool that matches dev. N/A pool N/A self pools N/A N/A pool_keys N/A N/A pool copy N/A N/A pool_keys N/A count N/A N/A pool_keys N/A devices N/A N/A N/A N/A len N/A N/A pool_keys keys N/A len N/A N/A dev_pool keys N/A N/A self _equal_properties dev_pool pool_keys N/A N/A dev_pool keys N/A N/A pool N/A _create_pool_keys_from_dev N/A N/A self dev N/A N/A N/A create a stats pool dict that this dev is supposed to be part of

        Note that this pool dict contains the stats pool's keys and their
        values. 'count' and 'devices' are not included.
         N/A devspec N/A N/A N/A self dev_filter get_devspec dev N/A N/A devspec N/A N/A N/A tags N/A N/A devspec get_tags N/A pool N/A k N/A getattr dev k N/A k N/A self pool_keys N/A tags N/A N/A N/A N/A pool update tags N/A pool N/A add_device N/A N/A self dev N/A N/A N/A Add a device to its matching pool. N/A dev_pool N/A N/A self _create_pool_keys_from_dev dev N/A dev_pool N/A N/A pool N/A N/A self _find_pool dev_pool N/A N/A pool N/A N/A N/A dev_pool N/A count 0 N/A N/A dev_pool N/A devices N/A N/A N/A N/A N/A self pools append dev_pool N/A N/A N/A N/A self pools sort key N/A N/A N/A item N/A N/A len item N/A pool dev_pool N/A N/A pool N/A count 1 N/A N/A N/A N/A pool N/A devices append dev N/A _decrease_pool_count N/A N/A pool_list pool count N/A 1 N/A N/A Decrement pool's size by count.

        If pool becomes empty, remove pool from pool_list.
         N/A N/A N/A pool N/A count count N/A N/A N/A pool N/A count count N/A count 0 N/A N/A count N/A pool N/A count N/A N/A N/A pool_list remove pool N/A count N/A staticmethod remove_device N/A N/A self dev N/A N/A N/A Remove one device from the first pool that it matches. N/A dev_pool N/A N/A self _create_pool_keys_from_dev dev N/A dev_pool N/A N/A pool N/A N/A self _find_pool dev_pool N/A N/A pool N/A N/A N/A N/A exception PciDevicePoolEmpty compute_node_id N/A dev compute_node_id address N/A dev address N/A N/A N/A N/A pool N/A devices remove dev N/A N/A N/A self _decrease_pool_count N/A self pools pool N/A get_free_devs N/A N/A self N/A N/A N/A free_devs N/A N/A pool N/A self pools N/A N/A N/A N/A free_devs extend N/A pool N/A devices N/A free_devs N/A consume_requests N/A N/A self pci_requests numa_cells N/A None N/A N/A alloc_devices N/A N/A request pci_requests N/A N/A count N/A request count N/A spec N/A request spec N/A pools N/A N/A self _filter_pools_for_spec N/A self pools spec N/A numa_cells N/A N/A pools N/A N/A self _filter_pools_for_numa_cells pools numa_cells N/A pools N/A N/A self _filter_non_requested_pfs request pools N/A N/A N/A sum N/A N/A pool N/A count N/A pool pools count N/A N/A N/A N/A LOG error N/A _LE Failed to allocate PCI devices for instance. Unassigning devices back to pools. This should not happen, since the scheduler should have accurate information, and allocation during claims is controlled via a hold on the compute node semaphore N/A d N/A range N/A len alloc_devices N/A N/A N/A N/A self add_device N/A N/A alloc_devices pop N/A None N/A pool pools N/A N/A N/A N/A pool N/A count count N/A N/A num_alloc count N/A N/A num_alloc N/A pool N/A count N/A count num_alloc N/A N/A pool N/A count num_alloc N/A d N/A range num_alloc N/A N/A pci_dev N/A N/A N/A pool N/A devices pop N/A N/A N/A self _handle_device_dependents pci_dev N/A N/A pci_dev request_id N/A request request_id N/A N/A N/A alloc_devices append pci_dev N/A N/A count 0 N/A N/A N/A alloc_devices N/A _handle_device_dependents N/A N/A self pci_dev N/A N/A N/A Remove device dependents or a parent from pools.

        In case the device is a PF, all of it's dependent VFs should
        be removed from pools count, if these are present.
        When the device is a VF, it's parent PF pool count should be
        decreased, unless it is no longer in a pool.
         N/A N/A N/A pci_dev dev_type N/A N/A fields PciDeviceType SRIOV_PF N/A N/A vfs_list N/A N/A N/A objects PciDeviceList get_by_parent_address N/A pci_dev _context N/A pci_dev compute_node_id N/A pci_dev address N/A vfs_list N/A N/A vf vfs_list N/A N/A N/A N/A self remove_device vf N/A N/A N/A N/A pci_dev dev_type N/A N/A fields PciDeviceType SRIOV_VF N/A N/A N/A N/A parent N/A N/A pci_dev get_by_dev_addr N/A pci_dev _context N/A pci_dev compute_node_id N/A pci_dev parent_addr N/A N/A parent N/A N/A self get_free_devs N/A N/A N/A N/A self remove_device parent N/A N/A N/A N/A exception PciDeviceNotFound N/A N/A N/A _filter_pools_for_spec N/A N/A pools request_specs N/A N/A N/A N/A pool N/A pool pools N/A N/A utils pci_device_prop_match pool request_specs N/A staticmethod _filter_pools_for_numa_cells N/A N/A pools numa_cells N/A N/A N/A numa_cells N/A N/A None N/A N/A cell id N/A cell numa_cells N/A N/A pool N/A pool pools N/A any N/A N/A N/A utils pci_device_prop_match pool N/A N/A numa_node cell N/A cell numa_cells N/A staticmethod _filter_non_requested_pfs N/A N/A self request matching_pools N/A N/A N/A N/A all N/A N/A N/A N/A spec get dev_type N/A N/A fields PciDeviceType SRIOV_PF N/A spec N/A request spec N/A N/A matching_pools N/A N/A self _filter_pools_for_pfs matching_pools N/A matching_pools N/A _filter_pools_for_pfs N/A N/A pools N/A N/A N/A N/A pool N/A pool pools N/A N/A N/A N/A pool get dev_type N/A N/A fields PciDeviceType SRIOV_PF N/A staticmethod _apply_request N/A N/A self pools request numa_cells N/A None N/A N/A count N/A request count N/A matching_pools N/A N/A self _filter_pools_for_spec pools N/A request spec N/A numa_cells N/A N/A matching_pools N/A N/A self _filter_pools_for_numa_cells matching_pools numa_cells N/A matching_pools N/A N/A self _filter_non_requested_pfs request matching_pools N/A N/A N/A sum N/A N/A pool N/A count N/A pool matching_pools count N/A N/A False N/A N/A pool matching_pools N/A N/A count N/A N/A self _decrease_pool_count pools pool count N/A N/A count N/A N/A N/A True N/A support_requests N/A N/A self requests numa_cells N/A None N/A N/A Check if the pci requests can be met.

        Scheduler checks compute node's PCI stats to decide if an
        instance can be scheduled into the node. Support does not
        mean real allocation.
        If numa_cells is provided then only devices contained in
        those nodes are considered.
         N/A pools N/A N/A copy deepcopy N/A self pools N/A N/A all N/A N/A N/A self _apply_request pools r numa_cells N/A r requests N/A apply_requests N/A N/A self requests numa_cells N/A None N/A N/A Apply PCI requests to the PCI stats.

        This is used in multiple instance creation, when the scheduler has to
        maintain how the resources are consumed by the instances.
        If numa_cells is provided then only devices contained in
        those nodes are considered.
         N/A N/A N/A all N/A N/A N/A self _apply_request N/A self pools r numa_cells N/A r requests N/A N/A N/A N/A exception PciDeviceRequestFailed requests requests N/A __iter__ N/A N/A self N/A N/A N/A pools N/A N/A pool N/A self pools N/A N/A tmp N/A k v N/A N/A k v N/A N/A six iteritems pool N/A k devices N/A N/A N/A pools append tmp N/A N/A iter pools N/A clear N/A N/A self N/A N/A N/A Clear all the stats maintained. N/A N/A self pools N/A N/A __eq__ N/A N/A self other N/A N/A N/A N/A N/A cmp N/A self pools N/A other pools 0 N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A self other N/A to_device_pools_obj N/A N/A self N/A N/A N/A Return the contents of the pools as a PciDevicePoolList object. N/A stats N/A x N/A x self N/A N/A N/A pci_device_pool from_pci_stats stats N/A N/A