Class AnnotationKeys


  • public final class AnnotationKeys
    extends Object
    Collection of keys for annotation.

    Number of the annotation keys have been deprecated as the use of annotations is being phased out and instead network configuration subsystem is being phased-in for majority of model meta-data.

    • Field Detail

      • CONNECTION_TYPE

        public static final String CONNECTION_TYPE
        Annotation key for UI connection type (the style for host link rendering).
        See Also:
        Constant Field Values
      • LOC_TYPE

        public static final String LOC_TYPE
        Annotation key for UI location type of device/host (either 'geo' or 'grid').
        See Also:
        Constant Field Values
      • LATITUDE

        public static final String LATITUDE
        Annotation key for latitude (e.g. latitude of device/host in a geo-layout).
        See Also:
        Constant Field Values
      • LONGITUDE

        public static final String LONGITUDE
        Annotation key for longitude (e.g. longitude of device/host in a geo-layout).
        See Also:
        Constant Field Values
      • GRID_Y

        public static final String GRID_Y
        Annotation key for grid-Y (e.g. y-coordinate of device/host in a grid-layout).
        See Also:
        Constant Field Values
      • GRID_X

        public static final String GRID_X
        Annotation key for grid-X (e.g. x-coordinate of device/host in a grid-layout).
        See Also:
        Constant Field Values
      • LATENCY

        public static final String LATENCY
        Annotation key for latency. The value of this key is expected to be latency in nanosecond.
        See Also:
        Constant Field Values
      • BANDWIDTH

        public static final String BANDWIDTH
        Annotation key for bandwidth. The value for this key is interpreted as Mbps.
        See Also:
        Constant Field Values
      • OPTICAL_WAVES

        public static final String OPTICAL_WAVES
        Annotation key for the number of optical waves.
        See Also:
        Constant Field Values
      • PORT_IN

        public static final String PORT_IN
        Annotation key for the optical channel receiving/in port (RX).
        See Also:
        Constant Field Values
      • PORT_OUT

        public static final String PORT_OUT
        Annotation key for the optical channel port transmitting/out port (TX).
        See Also:
        Constant Field Values
      • ADMIN_STATE

        public static final String ADMIN_STATE
        Annotation key for the admin state. The value of this key is expected to be "enabled" or "disabled"
        See Also:
        Constant Field Values
      • MANAGEMENT_ADDRESS

        public static final String MANAGEMENT_ADDRESS
        Annotation key for the management address.
        See Also:
        Constant Field Values
      • PROTECTED

        public static final String PROTECTED
        Link annotation key to express that a Link is backed by underlying protection mechanism.
        See Also:
        Constant Field Values
      • JITTER

        public static final String JITTER
        Annotation key for jitter. The value of this key is expected to be jitter in seconds
        See Also:
        Constant Field Values
      • DELAY

        public static final String DELAY
        Annotation key for delay. The value of this key is expected to be delay in seconds
        See Also:
        Constant Field Values
      • LOSS

        public static final String LOSS
        Annotation key for loss. The value of this key is expected to be loss in percentage.
        See Also:
        Constant Field Values
      • AVAILABILITY

        public static final String AVAILABILITY
        Annotation key for availability. The value of this key is expected to be availability as a percentage
        See Also:
        Constant Field Values
      • FLAPPING

        public static final String FLAPPING
        Annotation key for flapping. The value of this key is expected to be a subjective percentage for flapping
        See Also:
        Constant Field Values
      • METERED

        public static final String METERED
        Annotation key for identifying a metered link. The value of this key is expected to be a boolean for metered as true/false.
        See Also:
        Constant Field Values
      • METERED_USAGE

        public static final String METERED_USAGE
        Annotation key for data usage on a metered link. The value of this key is expected to be a percentage of the data available within the plan.
        See Also:
        Constant Field Values
      • TIER

        public static final String TIER
        Annotation key for identifying the tier ranking of a link. Links with a lower tier would be selected in the path over links with a higher tier. The value of this key is expected to be a number that represents the tier value.
        See Also:
        Constant Field Values
      • DATAPATH_DESCRIPTION

        public static final String DATAPATH_DESCRIPTION
        Annotation key for the datapath description. Provides a human readable description of a given datapath. Used, for instance, when an Openflow switch connects to the controller, in the response to the OFPMP_DESC request
        See Also:
        Constant Field Values
    • Method Detail

      • getAnnotatedValue

        public static double getAnnotatedValue​(Annotated annotated,
                                               String key)
        Returns the value annotated object for the specified annotation key. The annotated value is expected to be String that can be parsed as double. If parsing fails, the returned value will be 1.0.
        Parameters:
        annotated - annotated object whose annotated value is obtained
        key - key of annotation
        Returns:
        double value of annotated object for the specified key