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 ClassesModifier and TypeClassDescriptionstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.base.Predicate<Address> static final com.google.common.base.Predicate<String> static final com.google.common.base.Predicate<Address> protected Loggerprotected final GroupNamingConventionprotected Map<Server.Status, NodeMetadata.Status> -
Constructor Summary
ConstructorsConstructorDescriptionServerInRegionToNodeMetadata(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
Modifier and TypeMethodDescriptionapply(ServerInRegion serverInRegion) protected HardwarefindHardwareForServerOrNull(ServerInRegion serverInRegion) <T extends ComputeMetadata>
TfindObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion) protected 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
-
toPortableNodeStatus
-
locationIndex
-
images
-
hardwares
-
nodeNamingConvention
-
isFloatingAddress
-
isPrivateAddress
-
isInet4Address
-
-
Constructor Details
-
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 Details
-
apply
- Specified by:
applyin interfacecom.google.common.base.Function<ServerInRegion,NodeMetadata> - Specified by:
applyin interfaceFunction<ServerInRegion,NodeMetadata>
-
findHardwareForServerOrNull
-
findOperatingSystemForServerOrNull
-
findObjectOfTypeForServerOrNull
public <T extends ComputeMetadata> T findObjectOfTypeForServerOrNull(Set<? extends T> supply, String type, String objectId, RegionAndId serverInRegion)
-