RELAX-NG Schemas for NM-WG Measurement Reports

by Dan Gunter

NM-WG home

Index:

nm_params.rnc

# Test parameters
namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
   ParameterSet =
## The duration of the test
 element duration { xsd:float, element units { token } }?,
## Type of packets being sent
# XXX: Unfortunately, enumerations break wsdl2py!!
#element packetType { token "TCP" | token "ICMP" | token "UDP" }?,
 element packetType { token }?,
## Size of packets sent on network
 element packetSize { xsd:int, element units { token } }?,
## Number of packets sent on network
 element numPackets { xsd:int, element units { token } }?,
## What algorithm is used to space packets
# XXX: Unfortunately, enumerations break wsdl2py!!
#element packetSpacing { token "poisson" | token "periodic" }?,
 element packetSpacing { token }?,
## Time between test packets, in seconds (for periodic tests)
 element packetGap { xsd:float, element units { token } }?,
## IP version
 element protocolID { token }?,
## Type of service (IP precedence)
 element tos { xsd:short }?,
## Differentiated services code point
 element dscp { xsd:byte }?,
## IPv6 option for QoS
 element flowLabel { xsd:byte }?,
## Threshold used to distinguish between a large finite delay and loss
 element lossThreshold { xsd:int, element units { token } }?,
## Amount of test traffic
 element numBytes { xsd:int, element units { token } }?,
## Are bytes moving memory to memory or disk to disk?
 element includesDisk { xsd:boolean }?,
## Size of TCP buffers used
 element tcpBufferSize { xsd:int, element units { token } }?,
## Reno, Vegas, HSTCP, ScalableTCP, etc
 element tcpType { token }?,
## Number of parallel streams
 element numStreams { xsd:int }?,
## Additional user-defined parameters
 element other { Extensibility }?
}

nm_request.rnc

# NMWG Request

namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
    start = 
 element networkMeasurementRequest {
 element id { token },
 element networkMeasurementQuery { NetworkMeasurementQuery }*
        }
    NetworkMeasurementQuery =
 element characteristic { token }?,
 element timeRange { TimeRange }?
    TimeRange =
 element startTime { xsd:float },
 element endTime { xsd:float },
 element middle { xsd:float }?
}

nm_subject.rnc

# NMWG Report subject
#
# Implementation note: Had to take out some of the
# inheritance because my tool to convert RELAX-NG to
# XSD (Trang) will generate xs:group references. The
# original version has been left as a comment. -dkg

namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
   Address = 
## Host address
 element host { token },
## Port
 element port { xsd:int }?,
## Protocol (e.g IP) version: "IPv4" | "IPv6" | ...
 element version { token }
# Original inheritance hierarchy, see implementation note.
#   InternalNode = Node
#   Router = InternalNode
   Node =
 element address { Address },
 element name { string }?
   Path = 
 element source { Node }?,
 element destination { Node }?
   Hop = Path
   Host =
 element operatingSystem { OperatingSystem },
 element interface { NetworkInterface }*
   OperatingSystem = SoftwareDescription
   NetworkInterface =
 element address { Address },
 element card { NIC }
   NIC = 
## The logical name of the card as seen
## by the OS. E.g. eth0 hme0:1
 element logicalInterfaceName { string },
 element card { HardwareDescription }?,
 element firmware { SoftwareDescription }?,
 element driver { SoftwareDescription }?,
 element txqueuelen { xsd:float, element units { token } }?,
 element mtu { xsd:float, element units { token } }?,
 element iobus { string }?,
 element cpu { CPU },
 element maxTCPReadBuffer { xsd:float, element units { token } }?,
 element maxTCPWriteBuffer { xsd:float, element units { token } }?,
 element timer { TimerDevice }?,
## The protocol stack on this host, highest to lowest layer
 element protocolStack { element protocol { ProtocolLayer }+ }?
   CPU =
 element type { string },
 element speed { xsd:double, element units { token } }
   ProtocolLayer = Extensibility
## Piece of software
   SoftwareDescription =
 element name { string },
 element major { xsd:int }?,
 element minor { xsd:int }?,
 element release { xsd:int }?,
 element buildDate { xsd:int }?,
 element vendor { string }?,
 element versionString { string }*
## Piece of hardware
   HardwareDescription =
 element componentType { token },
 element manufacturere { string },
 element version { string }
}

nm_tool.rnc

# Network tool
namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
# Network measurement tool
   Tool = 
 element name { text },
 element major { xsd:int }?,
 element minor { xsd:int }?,
 element release { xsd:int }?,
 element buildDate { xsd:date }?,
 element vendor { text }?,
 element versionString { text }*
}

nm_extend.rnc

namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

# Extensibility element(s)
# Only restriction is that they must be in a namespace,
# and it must differ from this one
Extensibility = AnyElement*
AnyElement = element * - ( tns:* | local:* ) {
   text*,
   AnyAttribute*,
   AnyElement*
}
AnyAttribute = attribute * { text }*

nm_report.rnc

default namespace = "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

# This is a schema for publishing network
# measurement data. It is based on the GGF NM-WG document: "A
# Hierarchy of Network Performance Characteristics for Grid
# Applications and Services". Naming of characteristics should
# follow the conventions of the GGF DAMED-WG document, "An
# Analysis of 'Top N' Event Event Descriptions".

# First utils
#include "nm_values.rnc"
 include "nm_extend.rnc"
 include "nm_time.rnc"
# Then, core modules
 include "nm_subject.rnc"
 include "nm_result.rnc"
 include "nm_params.rnc"
 include "nm_tool.rnc"

start =
 element networkMeasurementReport { NetworkMeasurementReport }
## Type for root element
NetworkMeasurementReport =
## Identifier for report, matches some request identifier
 element id { token },
## Report versioning
 element version { token }?,
## One or more measurements
 element networkMeasurement { NetworkMeasurement }+
NetworkMeasurement =
## Network characteristic being measured
 element characteristic { token },
## Network portion being measured
# XXX: By labeling them with an element, we convince the
# XXX: relax-ng to XSD converter to not use group references, which
# XXX: is a feature not supported by wsdl2py
#element subject {  Node |  Path },
 element subject { element node { Node } | element path { Path } },
## Tools, tool parameters, etc. used for this measurement
 element methodology { Methodology }+,
## Results of the measurement
 element results { ResultSet }
ResultSet =
## Time interval spanning all results in the set
 element timeInterval { TimeInterval },
## A single result
 element result { Result }*,
## A statistical summary of result(s)
 element statistic { Statistic }*
Methodology =
## Which endpoint the methodology applies to, e.g. "source"
 element endpoint { Endpoint },
## Tool used to make the measurement
 element tool { Tool },
## Tool parameters
 element parameterSet { ParameterSet }*
## Recognized values: source, destination, all
Endpoint = element which { token }

nm_result.rnc

# NMWG Report result

namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
## Statistic
   Statistic =
## Time interval for the statistic.
 element timeInterval { TimeInterval }*,
## Name of statistic.
## The following names, at least, should be
## recognized: min, max, count, mean, median, stddev
 element name { token },
      (
## Single-valued statistic
 element value { xsd:double, element units { token } } |
## Percentile statistic
 element percentile {
 element value { xsd:double, element units { token } }, element percent { xsd:int }
         } |
## Confidence interval
 element confidence {
 element value { xsd:double, element units { token } }, element interval { xsd:int }
         } |
## User-defined statistic
 element other { Extensibility }
      )

## Measurement result
   Result = 
## Time interval for the result. It is optional so that multiple
## results can share the same interval (in this case the
## time interval would be in the parent element).
 element timeInterval { TimeInterval }*,
## Result value
      (  
 element delay { Delay } |
 element pathLoss { PathLoss } |
 element jitter { PathJitter } |
 element reordering { PathReordering } |
 element bandwidth { Bandwidth } |
 element achievableBandwidth { AchievableBandwidth } |
 element availableBandwidth { AvailableBandwidth } |
 element hopList { HopList } |
## Additional user-defined elements. Only restriction is that they
## must be in a namespace, and it must differ from this one
 element other { Extensibility }
      )
## From IETF. One way Delay
## (http://www.ietf.org/rfc/rfc2679.txt), Round Trip Delay
## (http://www.ietf.org/rfc/rfc2681.txt).
   Delay = 
 element value { xsd:double },
 element units { token }
   PathLoss =
## Number of packets since the previous loss (See RFC3357)
 element lossDistance { xsd:int, element units { token } },
## Number of groups of lost packets (See RFC3357)
 element lossPeriod { xsd:int, element units { token } },
## Percent of packets lost where if the distance between
## the lost packet and the previously lost packet is no
## greater than the "loss constraint" (See RFC3357)
 element noticeableRate { xsd:int, element units { token } },
## Total number of loss periods (See RFC3357)
 element periodTotal { xsd:int, element units { token } },
## Number of packets in a burst of loss (See RFC3357)
 element periodLengths { xsd:int, element units { token } },
## Number of packets between bursts of loss (See RFC3357)
 element interLossperiodLengths { xsd:int, element units { token } },
## Number of packets lost during the test (See RFC3357)
 element numPacketsLost { xsd:int, element units { token } },
## Average packet loss (in percent) (See RFC2680)
 element percentLoss { xsd:int, element units { token } }
## See RFC3393, http://www.ietf.org/rfc/rfc3393.txt
   PathJitter =
 element jitterPeakToPeakIpdv { xsd:double, element units { token } },
 element jitter { xsd:double, element units { token } }
## See http://www.ietf.org/internet-drafts/draft-ietf-ippm-reordering-02.txt
   PathReordering =
 element lateTime { xsd:double, element units { token } },
## Number of positions out of order
 element gap { xsd:double, element units { token } },
## Percent of packets reordered
 element percentReordered { xsd:int, element units { token } }
   Bandwidth =
## Which hop is the bottleneck ("tight link")
 element bandwidthBottleneck { Hop },
## The bandwidth measurement
 element jitterPeakToPeakIpdv { xsd:double, element units { token } }
   AchievableBandwidth =
## Indication of what is the bottleneck (network, CPU,
## NIC, memory, disk, etc.)
 element achievableBottleneck { string }?,
## The measurement
 element achievableThroughput { xsd:double, element units { token } }
   AvailableBandwidth =
## Which hop is the bottleneck ("tight link")
 element bandwidthBottleneck { Hop },
##  Mean Time Between Failures
 element MTBF { xsd:int, element units { token } },
## Number of periods when path was not available
 element downs { xsd:int, element units { token } },
## Median outage length
 element medianOutageLength { xsd:int, element units { token } },
## Percent availability = 100*(#unavailable cycles/total cycles)%
 element percentUp { xsd:int, element units { token } }
   HopList =
## Number of hops
 element hopCount { xsd:int },
 element units { token }
}

nm_time.rnc

# Time-related definitions

namespace local = ""
default namespace tns = 
   "http://www.ggf.org/namespaces/2004/01/gridNetworkMonitoring"

 grammar {
   TimeInterval =
 element timestamp { xsd:double }+
   TimerDevice = 
 element resolution { xsd:double }&
 element accuracy { xsd:double }&
 element offset { xsd:double }&
 element timeSource { string }
}