org.jclouds.openstack.nova.v2_0.compute.functions
Class ServerInZoneToNodeMetadata

java.lang.Object
  extended by org.jclouds.openstack.nova.v2_0.compute.functions.ServerInZoneToNodeMetadata
All Implemented Interfaces:
com.google.common.base.Function<ServerInZone,org.jclouds.compute.domain.NodeMetadata>

public class ServerInZoneToNodeMetadata
extends Object
implements com.google.common.base.Function<ServerInZone,org.jclouds.compute.domain.NodeMetadata>

A function for transforming a nova-specific Server into a generic NodeMetadata object.


Field Summary
protected  com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> hardwares
           
protected  com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images
           
static com.google.common.base.Predicate<String> isInet4Address
           
protected  com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex
           
protected  org.jclouds.logging.Logger logger
           
protected  org.jclouds.compute.functions.GroupNamingConvention nodeNamingConvention
           
protected  Map<Server.Status,org.jclouds.compute.domain.NodeMetadata.Status> toPortableNodeStatus
           
 
Constructor Summary
ServerInZoneToNodeMetadata(Map<Server.Status,org.jclouds.compute.domain.NodeMetadata.Status> toPortableNodeStatus, com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex, com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images, com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> hardwares, org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention)
           
 
Method Summary
 org.jclouds.compute.domain.NodeMetadata apply(ServerInZone serverInZone)
           
protected  org.jclouds.compute.domain.Hardware findHardwareForServerOrNull(ServerInZone serverInZone)
           
<T extends org.jclouds.compute.domain.ComputeMetadata>
T
findObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, ZoneAndId serverInZone)
           
protected  org.jclouds.compute.domain.OperatingSystem findOperatingSystemForServerOrNull(ServerInZone serverInZone)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Function
equals
 

Field Detail

logger

@Named(value="jclouds.compute")
protected org.jclouds.logging.Logger logger

toPortableNodeStatus

protected Map<Server.Status,org.jclouds.compute.domain.NodeMetadata.Status> toPortableNodeStatus

locationIndex

protected final com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex

images

protected final com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images

hardwares

protected final com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> hardwares

nodeNamingConvention

protected final org.jclouds.compute.functions.GroupNamingConvention nodeNamingConvention

isInet4Address

public static final com.google.common.base.Predicate<String> isInet4Address
Constructor Detail

ServerInZoneToNodeMetadata

@Inject
public ServerInZoneToNodeMetadata(Map<Server.Status,org.jclouds.compute.domain.NodeMetadata.Status> toPortableNodeStatus,
                                         com.google.common.base.Supplier<Map<String,org.jclouds.domain.Location>> locationIndex,
                                         com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>> images,
                                         com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>> hardwares,
                                         org.jclouds.compute.functions.GroupNamingConvention.Factory namingConvention)
Method Detail

apply

public org.jclouds.compute.domain.NodeMetadata apply(ServerInZone serverInZone)
Specified by:
apply in interface com.google.common.base.Function<ServerInZone,org.jclouds.compute.domain.NodeMetadata>

findHardwareForServerOrNull

protected org.jclouds.compute.domain.Hardware findHardwareForServerOrNull(ServerInZone serverInZone)

findOperatingSystemForServerOrNull

protected org.jclouds.compute.domain.OperatingSystem findOperatingSystemForServerOrNull(ServerInZone serverInZone)

findObjectOfTypeForServerOrNull

public <T extends org.jclouds.compute.domain.ComputeMetadata> T findObjectOfTypeForServerOrNull(Set<? extends T> supply,
                                                                                                String type,
                                                                                                String objectId,
                                                                                                ZoneAndId serverInZone)


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.