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 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