Class ServerInRegionToNodeMetadata
- java.lang.Object
 - 
- org.jclouds.openstack.nova.v2_0.compute.functions.ServerInRegionToNodeMetadata
 
 
- 
- All Implemented Interfaces:
 com.google.common.base.Function<ServerInRegion,NodeMetadata>,Function<ServerInRegion,NodeMetadata>
public class ServerInRegionToNodeMetadata extends Object implements com.google.common.base.Function<ServerInRegion,NodeMetadata>
A function for transforming a nova-specific Server into a generic NodeMetadata object. 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classServerInRegionToNodeMetadata.AddressToStringTransformationFunction 
- 
Field Summary
Fields Modifier and Type Field Description protected com.google.common.base.Supplier<Set<? extends Hardware>>hardwaresprotected com.google.common.base.Supplier<Set<? extends Image>>imagesstatic com.google.common.base.Predicate<Address>isFloatingAddressstatic com.google.common.base.Predicate<String>isInet4Addressstatic com.google.common.base.Predicate<Address>isPrivateAddressprotected com.google.common.base.Supplier<Map<String,Location>>locationIndexprotected Loggerloggerprotected GroupNamingConventionnodeNamingConventionprotected Map<Server.Status,NodeMetadata.Status>toPortableNodeStatus 
- 
Constructor Summary
Constructors Constructor Description ServerInRegionToNodeMetadata(Map<Server.Status,NodeMetadata.Status> toPortableNodeStatus, com.google.common.base.Supplier<Map<String,Location>> locationIndex, com.google.common.base.Supplier<Set<? extends Image>> images, com.google.common.base.Supplier<Set<? extends Hardware>> hardwares, GroupNamingConvention.Factory namingConvention) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeMetadataapply(ServerInRegion serverInRegion)protected HardwarefindHardwareForServerOrNull(ServerInRegion serverInRegion)<T extends ComputeMetadata>
TfindObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion)protected OperatingSystemfindOperatingSystemForServerOrNull(ServerInRegion serverInRegion) 
 - 
 
- 
- 
Field Detail
- 
logger
@Named("jclouds.compute") protected Logger logger 
- 
toPortableNodeStatus
protected Map<Server.Status,NodeMetadata.Status> toPortableNodeStatus
 
- 
nodeNamingConvention
protected final GroupNamingConvention nodeNamingConvention
 
- 
isFloatingAddress
public static final com.google.common.base.Predicate<Address> isFloatingAddress
 
- 
isPrivateAddress
public static final com.google.common.base.Predicate<Address> isPrivateAddress
 
- 
isInet4Address
public static final com.google.common.base.Predicate<String> isInet4Address
 
 - 
 
- 
Constructor Detail
- 
ServerInRegionToNodeMetadata
@Inject public ServerInRegionToNodeMetadata(Map<Server.Status,NodeMetadata.Status> toPortableNodeStatus, com.google.common.base.Supplier<Map<String,Location>> locationIndex, com.google.common.base.Supplier<Set<? extends Image>> images, com.google.common.base.Supplier<Set<? extends Hardware>> hardwares, GroupNamingConvention.Factory namingConvention)
 
 - 
 
- 
Method Detail
- 
apply
public NodeMetadata apply(ServerInRegion serverInRegion)
- Specified by:
 applyin interfacecom.google.common.base.Function<ServerInRegion,NodeMetadata>- Specified by:
 applyin interfaceFunction<ServerInRegion,NodeMetadata>
 
- 
findHardwareForServerOrNull
protected Hardware findHardwareForServerOrNull(ServerInRegion serverInRegion)
 
- 
findOperatingSystemForServerOrNull
protected OperatingSystem findOperatingSystemForServerOrNull(ServerInRegion serverInRegion)
 
- 
findObjectOfTypeForServerOrNull
public <T extends ComputeMetadata> T findObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion)
 
 - 
 
 -