Class ServerInRegionToNodeMetadata
java.lang.Object
org.jclouds.openstack.nova.v2_0.compute.functions.ServerInRegionToNodeMetadata
- All Implemented Interfaces:
com.google.common.base.Function<ServerInRegion,,org.jclouds.compute.domain.NodeMetadata> Function<ServerInRegion,org.jclouds.compute.domain.NodeMetadata>
public class ServerInRegionToNodeMetadata
extends Object
implements com.google.common.base.Function<ServerInRegion,org.jclouds.compute.domain.NodeMetadata>
A function for transforming a nova-specific Server into a generic
NodeMetadata object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Hardware>>protected final com.google.common.base.Supplier<Set<? extends org.jclouds.compute.domain.Image>>static final com.google.common.base.Predicate<Address>static final com.google.common.base.Predicate<String>static final com.google.common.base.Predicate<Address>protected org.jclouds.logging.Loggerprotected final org.jclouds.compute.functions.GroupNamingConventionprotected Map<Server.Status,org.jclouds.compute.domain.NodeMetadata.Status> -
Constructor Summary
ConstructorsConstructorDescriptionServerInRegionToNodeMetadata(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
Modifier and TypeMethodDescriptionorg.jclouds.compute.domain.NodeMetadataapply(ServerInRegion serverInRegion) protected org.jclouds.compute.domain.HardwarefindHardwareForServerOrNull(ServerInRegion serverInRegion) <T extends org.jclouds.compute.domain.ComputeMetadata>
TfindObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion) protected org.jclouds.compute.domain.OperatingSystemfindOperatingSystemForServerOrNull(ServerInRegion serverInRegion) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.common.base.Function
equals
-
Field Details
-
logger
@Named("jclouds.compute") protected org.jclouds.logging.Logger logger -
toPortableNodeStatus
-
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 -
isFloatingAddress
-
isPrivateAddress
-
isInet4Address
-
-
Constructor Details
-
ServerInRegionToNodeMetadata
@Inject public ServerInRegionToNodeMetadata(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 Details
-
apply
- Specified by:
applyin interfacecom.google.common.base.Function<ServerInRegion,org.jclouds.compute.domain.NodeMetadata> - Specified by:
applyin interfaceFunction<ServerInRegion,org.jclouds.compute.domain.NodeMetadata>
-
findHardwareForServerOrNull
protected org.jclouds.compute.domain.Hardware findHardwareForServerOrNull(ServerInRegion serverInRegion) -
findOperatingSystemForServerOrNull
protected org.jclouds.compute.domain.OperatingSystem findOperatingSystemForServerOrNull(ServerInRegion serverInRegion) -
findObjectOfTypeForServerOrNull
public <T extends org.jclouds.compute.domain.ComputeMetadata> T findObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion)
-