Ejemplo n.º 1
0
 protected List<Attribute> createAttributesToDeRegister(PriamInstance instance) {
   List<Attribute> attrs = new ArrayList<Attribute>();
   attrs.add(new Attribute(Attributes.INSTANCE_ID, instance.getInstanceId()));
   attrs.add(new Attribute(Attributes.TOKEN, instance.getToken()));
   attrs.add(new Attribute(Attributes.APP_ID, instance.getApp()));
   attrs.add(new Attribute(Attributes.ID, Integer.toString(instance.getId())));
   attrs.add(new Attribute(Attributes.AVAILABILITY_ZONE, instance.getRac()));
   attrs.add(new Attribute(Attributes.ELASTIC_IP, instance.getHostIP()));
   attrs.add(new Attribute(Attributes.HOSTNAME, instance.getHostName()));
   attrs.add(new Attribute(Attributes.LOCATION, instance.getDC()));
   attrs.add(new Attribute(Attributes.UPDATE_TS, Long.toString(instance.getUpdatetime())));
   return attrs;
 }
Ejemplo n.º 2
0
 private String getKey(PriamInstance instance) {
   return instance.getApp() + instance.getId();
 }