'Update an inventory.
:param resource_provider_uuid: UUID of the resource provider
:type resource_provider_uuid: str
:param inventory: The inventory
:type inventory: dict
:param resource_class: The resource class of the inventory to update
:type resource_class: str
:raises n_exc.PlacementInventoryUpdateConflict: For failure to updste
inventory due to outdated resource_provider_generation'

@check_placement_api_available
def update_inventory(self, resource_provider_uuid, inventory, resource_class):

    url = ('/resource_providers/%s/inventories/%s' % (resource_provider_uuid, resource_class))
    try:
        self._put(url, inventory)
    except ks_exc.Conflict:
        raise n_exc.PlacementInventoryUpdateConflict(resource_provider=resource_provider_uuid, resource_class=resource_class)
