deb-ceilometer/ceilometer/agent/discovery/localnode.py
Edwin Zhai b7426c545c Add local node resource for IPMI pollsters
Each pollster should have some resources for polling, but IPMI
pollster is an exception that talk with local IPMI HW directly by
ipmitool. Local node resource is faked resource that stands for
endpoint of localhost. With it, IPMI pollsters can be handled in the
same way as others.

Change-Id: Icda81ffa2334b764e7b508f26efd031f2a863e64
2015-02-06 14:59:48 +08:00

22 lines
787 B
Python

# Copyright 2015 Intel
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from ceilometer.agent import plugin_base
class LocalNodeDiscovery(plugin_base.DiscoveryBase):
def discover(self, manager, param=None):
"""Return local node as resource."""
return ['local_host']