Exemple #1
0
    def set_maintain_proxydevices(self, arg):
        from ZenPacks.zenoss.OpenStackInfrastructure.DeviceProxyComponent \
            import DeviceProxyComponent
        for meta_type in DeviceProxyComponent.deviceproxy_meta_types():
            for component in self.getDeviceComponents(type=meta_type):
                component.maintain_proxy_device()

        return True
def setApplyDataMapToOpenStackInfrastructureHost(self, datamap):
    mapper = ApplyDataMap()

    component = DeviceProxyComponent.component_for_proxy_device(self)
    if not component:
        log.error("Unable to apply datamap to proxy component for %s (component not found)" % self)
    else:
        mapper._applyDataMap(component, datamap)
Exemple #3
0
    def get_maintain_proxydevices(self):
        from ZenPacks.zenoss.OpenStackInfrastructure.DeviceProxyComponent \
            import DeviceProxyComponent
        for meta_type in DeviceProxyComponent.deviceproxy_meta_types():
            for component in self.getDeviceComponents(type=meta_type):
                if component.need_maintenance():
                    return False

        return True
def setApplyDataMapToOpenStackInfrastructureHost(self, datamap):
    mapper = ApplyDataMap()

    component = DeviceProxyComponent.component_for_proxy_device(self)
    if not component:
        log.error(
            "Unable to apply datamap to proxy component for %s (component not found)"
            % self)
    else:
        mapper._applyDataMap(component, datamap)
def openstack_hostComponent(self):
    # If this is an openstack compute node, returns a the OpenstackHost component for it.
    host = DeviceProxyComponent.component_for_proxy_device(self)
    if host is not None and host.meta_type == 'OpenStackInfrastructureHost':
        return host
    return None
def openstack_hostComponent(self):
    # If this is an openstack compute node, returns a the OpenstackHost component for it.
    host = DeviceProxyComponent.component_for_proxy_device(self)
    if host is not None and host.meta_type == 'OpenStackInfrastructureHost':
        return host
    return None