Github user grkvlt commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/304#discussion_r75683154
  
    --- Diff: 
core/src/main/java/org/apache/brooklyn/core/entity/AbstractEntity.java ---
    @@ -196,7 +196,11 @@
                 "entity.group.added", "Group dynamically added to entity");
         public static final BasicNotificationSensor<Group> GROUP_REMOVED = new 
BasicNotificationSensor<Group>(Group.class,
                 "entity.group.removed", "Group dynamically removed from 
entity");
    -    
    +
    +    public static final AttributeSensor<String> ENTITY_ID = 
Attributes.ENTITY_ID;
    +    public static final AttributeSensor<String> APPLICATION_ID = 
Attributes.APPLICATION_ID;
    +    public static final AttributeSensor<String> CATALOG_ID = 
Attributes.CATALOG_ID;
    --- End diff --
    
    It isn't possible to access these fields in YAML though - the _only_ things 
we can access that way are attributes and config, so exporting as sensor data 
seems the right way to expose them. I did add an `entityId()` command to the 
DSL, but this is only available where we have the entity available as context 
to execute the command, which is not possible inside enrichers etc, where 
(again) all we can access is sensor data on some (as yet unspecified) entity. I 
think its perfectly reasonable to add these, since sensor/attribute data is the 
main and often only way of obtaining information in blueprints.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to