コード例 #1
0
    @Override
    public Set<OnmsAttribute> load() {
      LOG.debug(
          "lazy-loading attributes for distributed status resource {}-{}/{}",
          m_definitionName,
          m_locationMonitorId,
          m_intf);

      return ResourceTypeUtils.getAttributesAtRelativePath(
          m_resourceDao.getRrdDirectory(), getRelativeInterfacePath(m_locationMonitorId, m_intf));
    }
コード例 #2
0
 @Override
 public Set<OnmsAttribute> load() {
   Set<OnmsAttribute> attributes =
       ResourceTypeUtils.getAttributesAtRelativePath(
           m_resourceDao.getRrdDirectory(), getRelativePathForResource(m_parent, m_resource));
   if (m_ifSpeed != null) {
     attributes.add(new ExternalValueAttribute("ifSpeed", m_ifSpeed.toString()));
   }
   if (m_ifSpeedFriendly != null) {
     attributes.add(new ExternalValueAttribute("ifSpeedFriendly", m_ifSpeedFriendly));
   }
   return attributes;
 }
コード例 #3
0
 /** {@inheritDoc} */
 @Override
 public boolean isResourceTypeOnNodeSource(String nodeSource, int nodeId) {
   File parent = ResourceTypeUtils.getRelativeNodeSourceDirectory(nodeSource);
   return isResourceTypeOnParentResource(parent.toString());
 }