public class CreateUserPolicy extends AbstractPolicy implements SensorEventListener<Location>
SshMachineLocation is added to that entity
 (e.g. when a VM has been provisioned for it).
 
 The policy will then (asynchronously) add a new user to the VM, with a randomly generated password.
 The ssh details will be set as a sensor on the entity.
 
 If this is used, it is strongly encouraged to tell users to change the password on first login.
 
 A preferred mechanism would be for an external key-management tool to generate ssh key-pairs for
 the user, and for the public key to be passed to Brooklyn. However, there is not a customer 
 requirement for that yet, so focusing on the password-approach.AbstractEntityAdjunct.AdjunctTagSupport, AbstractEntityAdjunct.BasicSubscriptionSupportBrooklynObject.RelationSupport<T extends BrooklynObject>, BrooklynObject.SubscriptionSupport, BrooklynObject.TagSupportConfigurable.ConfigurationSupportBrooklynObjectInternal.ConfigurationSupportInternal, BrooklynObjectInternal.RelationSupportInternal<T extends BrooklynObject>, BrooklynObjectInternal.SubscriptionSupportInternal| Modifier and Type | Field and Description | 
|---|---|
| static ConfigKey<java.lang.Boolean> | GRANT_SUDO | 
| static ConfigKey<java.lang.Boolean> | RESET_LOGIN_USER | 
| static AttributeSensor<java.lang.String> | VM_USER_CREDENTIALS | 
| static ConfigKey<java.lang.String> | VM_USERNAME | 
NOOP| Constructor and Description | 
|---|
| CreateUserPolicy() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | onEvent(SensorEvent<Location> event)The  SensorEventhandler method. | 
| void | setEntity(EntityLocal entity) | 
destroy, getPolicyType, getRebindSupport, isRunning, isSuspended, relations, resume, suspend, toStringconfig, configure, getAdjunctType, getConfig, getConfigMap, getDisplayName, getUniqueTag, isDestroyed, setConfig, setDisplayName, subscribe, subscribeToChildren, subscribeToMembers, subscriptions, tags, unsubscribe, unsubscribegetCatalogItemId, getId, getManagementContext, init, rebind, setCatalogItemId, setManagementContextequals, getClass, hashCode, notify, notifyAll, wait, wait, waitgetUniqueTag, isDestroyedgetCatalogItemId, getDisplayName, subscriptions, tagsconfig, getConfigsetCatalogItemIdpublic static final ConfigKey<java.lang.String> VM_USERNAME
public static final ConfigKey<java.lang.Boolean> GRANT_SUDO
public static final AttributeSensor<java.lang.String> VM_USER_CREDENTIALS
public static final ConfigKey<java.lang.Boolean> RESET_LOGIN_USER
public void setEntity(EntityLocal entity)
setEntity in class AbstractEntityAdjunctpublic void onEvent(SensorEvent<Location> event)
SensorEventListenerSensorEvent handler method.onEvent in interface SensorEventListener<Location>