Skip to Content.
Sympa Menu

perfsonar-dev - nmwg: r236 - in trunk/nmwg/schema: . example_instances rnc

Subject: perfsonar development work

List archive

nmwg: r236 - in trunk/nmwg/schema: . example_instances rnc


Chronological Thread 
  • From:
  • To: ,
  • Subject: nmwg: r236 - in trunk/nmwg/schema: . example_instances rnc
  • Date: Tue, 19 Jun 2007 11:07:48 -0400

Author: zurawski
Date: 2007-06-19 11:07:47 -0400 (Tue, 19 Jun 2007)
New Revision: 236

Modified:
trunk/nmwg/schema/example_instances/snmp.xml
trunk/nmwg/schema/rnc/snmp.rnc
trunk/nmwg/schema/test-instances.sh
Log:
Changes to SNMP instance and schema to reflect pS-PS use.

-jason



Modified: trunk/nmwg/schema/example_instances/snmp.xml
===================================================================
--- trunk/nmwg/schema/example_instances/snmp.xml 2007-06-14 17:38:29
UTC (rev 235)
+++ trunk/nmwg/schema/example_instances/snmp.xml 2007-06-19 15:07:47
UTC (rev 236)
@@ -1,108 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
-<nmwg:message type="store"
- xmlns="http://ggf.org/ns/nmwg/base/2.0/";
- xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
- xmlns:snmp="http://ggf.org/ns/nmwg/tools/snmp/2.0/";
- xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
- xmlns:nmtm="http://ggf.org/ns/nmwg/time/2.0/";
- xmlns:nmtl4="http://ggf.org/ns/nmwg/topology/l4/3.0/";
- xmlns:nmtl3="http://ggf.org/ns/nmwg/topology/l3/3.0/";
- xmlns:nmtl2="http://ggf.org/ns/nmwg/topology/l2/3.0/";
- xmlns:nmwgtopo3="http://ggf.org/ns/nmwg/topology/base/3.0/";
- xmlns:nmwgr="http://ggf.org/ns/nmwg/result/2.0/";>
+<nmwg:message type="something"
+ xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
+ xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";
+ xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";
+ xmlns:snmp="http://ggf.org/ns/nmwg/tools/snmp/2.0/";>

- <nmwg:metadata id="iumeta1">
- <snmp:subject id="iusub1">
- <nmwgt:interface>
- <nmwgt:ipAddress type="v4">10.10.11.1</nmwgt:ipAddress>
- <nmwgt:hostName>dreadnought</nmwgt:hostName>
+ <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
id="192.168.0.202-1">
+ <netutil:subject
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";
id="mead0">
+ <nmwgt:interface xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+ <nmwgt:ifAddress type="ipv4">192.168.0.202</nmwgt:ifAddress>
+ <nmwgt:hostName>mead</nmwgt:hostName>
<nmwgt:ifName>eth0</nmwgt:ifName>
- <nmwgt:ifDescription>gigE</nmwgt:ifDescription>
- <nmwgt:ifAddress type="ipv4">128.4.133.163</nmwgt:ifAddress>
- <nmwgt:ifIndex>0</nmwgt:ifIndex>
- <nmwgt:type>eth0</nmwgt:type>
- <nmwgt:authRealm>someauth</nmwgt:authRealm>
-<!--
- goes back to queueing strategy, could be
- more specifications?
-
- <classOfService>Best Effort</nmwgt:classOfService>
- <classOfService>Scavenger</nmwgt:classOfService>
- <classOfService>OSCARS</nmwgt:classOfService>
- <classOfService>All</nmwgt:classOfService>

--->
- <nmwgt:classOfService>All</nmwgt:classOfService>
-<!--
- Can specify this up here, or use seperate metadata chains
- to describe.
-
- <nmwgt:direction>*</nmwgt:direction>
+ <nmwgt:ifIndex>2</nmwgt:ifIndex>
<nmwgt:direction>in</nmwgt:direction>
- <nmwgt:direction>out</nmwgt:direction>
--->
+ <nmwgt:capacity>1000000000</nmwgt:capacity>
</nmwgt:interface>
- </snmp:subject>
-
- <snmp:parameters id="param1">
- <nmwg:parameter
name="OID_Numeric">.1.3.6.1.2.1.2.2.1.10.2</nmwg:parameter>
- <nmwg:parameter name="OID_String">ifInOctets.2</nmwg:parameter>
- <nmwg:parameter name="OID_Alias">ifInOctets</nmwg:parameter>
- <nmwg:parameter name="SNMP_Version">1</nmwg:parameter>
- <nmwg:parameter name="SNMP_Community_Name">public</nmwg:parameter>
- <!--
- <nmwg:parameter name="SNMP_Username"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Password"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Password_MD5"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Agent"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Agent_Port"></nmwg:parameter>
- -->
- </snmp:parameters>
-
+ </netutil:subject>
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <snmp:parameters xmlns:snmp="http://ggf.org/ns/nmwg/tools/snmp/2.0/";
id="1">
+ <nmwg:parameter
name="supportedEventType">http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:parameter>
+ <nmwg:parameter name="SNMPVersion" value="1"/>
+ <nmwg:parameter name="SNMPCommunity" value="public"/>
+ <nmwg:parameter name="OID" value="1.3.6.1.2.1.2.2.1.10"/>
+ <nmwg:parameter name="Alias" value="ifInOctets"/>
+ </snmp:parameters>
</nmwg:metadata>

- <!-- Metadata(s) using new topology schema -->
+ <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; id="data1"
metadataIdRef="192.168.0.202-1">
+ <nmwg:key id="1">
+ <nmwg:parameters id="2">
+ <nmwg:parameter name="type">rrd</nmwg:parameter>
+ <nmwg:parameter name="valueUnits">Bps</nmwg:parameter>
+ <nmwg:parameter
name="file">/home/jason/perfSONAR-PS/MP/SNMP/mead.rrd</nmwg:parameter>
+ <nmwg:parameter name="dataSource">eth0-in</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
+ </nmwg:data>

- <nmwg:metadata id="iumeta2">
- <snmp:subject id="iusub2">
-
- <!-- we could use any of the specific interfaces from
- topo as well ... (L2, L3) -->
-
- <nmwgtopo3:interface id="d1">
- <nmwgtopo3:name type="string">dreadnought</nmwgtopo3:name>
- <nmwgtopo3:type>pc</nmwgtopo3:type>
- <nmwgtopo3:hostName>dreadnought.cis.udel.edu</nmwgtopo3:hostName>
- <nmwgtopo3:ifName>eth0</nmwgtopo3:ifName>
- <nmwgtopo3:ifDescription>gigE</nmwgtopo3:ifDescription>
- <nmwgtopo3:ifIndex>0</nmwgtopo3:ifIndex>
- <nmwgtopo3:capacity>1000000000</nmwgtopo3:capacity>
- </nmwgtopo3:interface>
+ <nmwg:metadata xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";
id="192.168.0.202-2">
+ <snmp:subject
xmlns:netutil="http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";
id="mead0">
+ <nmwgt:interface xmlns:nmwgt="http://ggf.org/ns/nmwg/topology/2.0/";>
+ <nmwgt:ifAddress type="ipv4">192.168.0.202</nmwgt:ifAddress>
+ <nmwgt:hostName>mead</nmwgt:hostName>
+ <nmwgt:ifName>eth0</nmwgt:ifName>
+ <nmwgt:ifIndex>2</nmwgt:ifIndex>
+ <nmwgt:direction>out</nmwgt:direction>
+ <nmwgt:capacity>1000000000</nmwgt:capacity>
+ </nmwgt:interface>
</snmp:subject>
-
- <snmp:parameters id="param2">
- <nmwg:parameter
name="OID_Numeric">.1.3.6.1.2.1.2.2.1.10.2</nmwg:parameter>
- <nmwg:parameter name="OID_String">ifInOctets.2</nmwg:parameter>
- <nmwg:parameter name="OID_Alias">ifInOctets</nmwg:parameter>
- <nmwg:parameter name="SNMP_Version">1</nmwg:parameter>
- <nmwg:parameter name="SNMP_Community_Name">public</nmwg:parameter>
- <!--
- <nmwg:parameter name="SNMP_Username"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Password"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Password_MD5"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Agent"></nmwg:parameter>
- <nmwg:parameter name="SNMP_Agent_Port"></nmwg:parameter>
- -->
- </snmp:parameters>
-
+
<nmwg:eventType>http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:eventType>
+ <snmp:parameters xmlns:snmp="http://ggf.org/ns/nmwg/tools/snmp/2.0/";
id="3">
+ <nmwg:parameter
name="supportedEventType">http://ggf.org/ns/nmwg/characteristic/utilization/2.0</nmwg:parameter>
+ <nmwg:parameter name="SNMPVersion" value="1"/>
+ <nmwg:parameter name="SNMPCommunity" value="public"/>
+ <nmwg:parameter name="OID" value="1.3.6.1.2.1.2.2.1.10"/>
+ <nmwg:parameter name="Alias" value="ifInOctets"/>
+ </snmp:parameters>
</nmwg:metadata>

- <nmwg:data id="data1" metadataIdRef="iumetadata1">
- <snmp:datum type="Counter32" value="34765" timeType="unix"
timeValue="1107492095"/>
- </nmwg:data>

- <!-- result datum elements -->
- <nmwg:data id="data2" metadataIdRef="iumeta1">
- <nmwgr:datum type="error">Some Error String</nmwgr:datum>
- </nmwg:data>
-
+ <nmwg:data xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/"; id="data2"
metadataIdRef="192.168.0.202-2">
+ <nmwg:key id="2">
+ <nmwg:parameters id="4">
+ <nmwg:parameter name="type">sqlite</nmwg:parameter>
+ <nmwg:parameter
name="file">/home/jason/perfSONAR-PS/MP/SNMP/data.db</nmwg:parameter>
+ <nmwg:parameter name="table">data</nmwg:parameter>
+ </nmwg:parameters>
+ </nmwg:key>
+ </nmwg:data>
+
</nmwg:message>

Modified: trunk/nmwg/schema/rnc/snmp.rnc
===================================================================
--- trunk/nmwg/schema/rnc/snmp.rnc 2007-06-14 17:38:29 UTC (rev 235)
+++ trunk/nmwg/schema/rnc/snmp.rnc 2007-06-19 15:07:47 UTC (rev 236)
@@ -2,7 +2,7 @@
#
# File: snmp.rnc - Specialized schema for snmp
#
-# Version: $Id$
+# Version: $Id:$
# Purpose: Describes specific elements to be used in the
# representation and handling of snmp
# Reference: http://books.xmlschemata.org/relaxng/page2.html
@@ -16,8 +16,8 @@
namespace nmwg = "http://ggf.org/ns/nmwg/base/2.0/";
namespace snmp = "http://ggf.org/ns/nmwg/tools/snmp/2.0/";
namespace nmwgr = "http://ggf.org/ns/nmwg/result/2.0/";
+namespace netutil = "http://ggf.org/ns/nmwg/characteristic/utilization/2.0/";

-
# ##############################################################
# Include additional functionality from other files
# ##############################################################
@@ -31,31 +31,12 @@


# ##############################################################
-# Metadata is the 'data' that describes physical measurements.
-# Metadata can be something such as a physical address, or
-# a geographical location; any form of static, re-usable
-# designation. It is important to note that the subject
-# namespace and parameters namespace MUST match (or the parameters
-# can be a generic NMWG) or bad things will occur.
+#
+# The metadata in this case is an NMWG metadata block, with options
+# of having an SNMP subject, some form of parameters block (SNMP,
+# Filtering [select, etc.], or NMWG), an eventType block with
+# enumerated values, and a key with specified enumerated values.
#
-# Example:
-#
-# <nmwg:metadata id="REQUIRED_ID"
-# metadataIdRef="OPTIONAL_REFERENCE_ID"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-#
-# <!-- TBD OPTIONAL SUBJECT -->
-#
-# <!-- TBD OPTIONAL PARAMETERS -->
-#
-# <!-- TBD OPTIONAL EVENTTYPE -->
-#
-# <!-- TBD OPTIONAL KEY -->
-#
-# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
-#
-# </nmwg:metadata>
-#
# ##############################################################

SNMPMetadata =
@@ -66,8 +47,11 @@
}

SNMPMetadataBlock =
- SNMPSubject? &
(
+ SNMPSubject |
+ UtilSubject
+ )? &
+ (
SNMPParameters |
Parameters
)?
@@ -77,68 +61,42 @@
SNMPMetadataBlock |
FilterMetadataBlock
) &
- EventType? &
+ SNMPEventType? &
Key?


# ##############################################################
-# Redefined snmp subject allows only an endPointPair, and the
-# two id attributes.
+#
+# Subject is a topology 'interface' as well as ids and reference
+# attributes.
#
-# Example:
-#
-# <snmp:subject id="REQUIRED_ID"
-# metadataIdRef="OPTIONAL_REFERENCE_ID"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/tools/snmp/2.0/";>
-#
-# <nmwgtopo:endPointPair
xmlns:nmwgtopo="http://ggf.org/ns/nmwg/topology/2.0/";>
-#
-# <nmwgtopo:src type="REQUIRED_TYPE" value="REQUIRED_VALUE"
-# port="OPTIONAL_PORT"/>
-#
-# <nmwgtopo:dst type="REQUIRED_TYPE" value="REQUIRED_VALUE"
-# port="OPTIONAL_PORT"/>
-#
-# </nmwgtopo:endPointPair>
-#
-# </snmp:subject>
-#
# ##############################################################

SNMPSubject =
element snmp:subject {
- Identifier &
- MetadataIdentifierRef? &
- (
- Interface |
- BaseInterface |
- L2Interface |
- L3Interface
- )?
+ SNMPSubjectContent
}

+UtilSubject =
+ element netutil:subject {
+ SNMPSubjectContent
+ }

+SNMPSubjectContent =
+ Identifier &
+ MetadataIdentifierRef? &
+ (
+ Interface |
+ BaseInterface |
+ L2Interface |
+ L3Interface
+ )?
+
# ##############################################################
-# This is simply the regular method of doing parameters with an
-# enumeration to limit what 'names' are accepted and an outer
-# snmp: namespace for the parameters.
+#
+# Parameters are mostly used in the context of an MP providing
+# contact information to gather data.
#
-# Example:
-#
-# <snmp:parameters id="REQUIRED_ID"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/tools/snmp/2.0/";>
-#
-# <nmwg:parameter name="REQUIRED_ENUM_NAME" value="OPTIONAL_VALUE"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-#
-# <!-- ANY TEXT, (IF YOU DID NOT USE THE VALUE ATTRIBUTE) -->
-#
-# </nmwg:parameter>
-#
-# <!-- MORE PARAMETERS -->
-#
-# </snmp:parameters>
-#
# ##############################################################

SNMPParameters =
@@ -149,11 +107,8 @@

SNMPParameter =
element nmwg:parameter {
- attribute name { "OID_Numeric" | "OID_String" | "OID_Alias"
|
- "SNMP_Version" | "SNMP_Community_Name" |
- "SNMP_Username" | "SNMP_Password" |
- "SNMP_Password_MD5" | "SNMP_Agent" |
- "SNMP_Agent_Port" } &
+ attribute name { "supportedEventType" | "SNMPVersion" |
+ "SNMPCommunity" | "OID" | "Alias" } &
(
attribute value { text } |
text
@@ -162,134 +117,80 @@


# ##############################################################
-# The data block is complex, and has the potential to contain
-# many things. The data block can be used to return a metadata
-# block from a request, commonTime or datum elements, keys,
-# or something that we have perhaps not defined as of yet.
+#
+# EventType can be the specific (gathered via SNMP) or can resemble
+# the characteristic type of the measurement (utilization, errors,
+# drops, etc.)
#
-# Example:
+# ##############################################################
+
+SNMPEventType =
+ element nmwg:eventType {
+ "http://ggf.org/ns/nmwg/characteristic/utilization/2.0"; |
+ "http://ggf.org/ns/nmwg/tools/snmp/2.0";
+ }
+
+# ##############################################################
+#
+# Key is used to describe the backend storage, we use primarily
+# RRD files, and SQL databases (MySQL, SQLite, etc.)
#
-# <nmwg:data id="REQUIRED_ID"
-# metadataIdRef="OPTIONAL_REFERENCE_ID"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-#
-# <!-- OPTIONAL (MULTIPLE) METADATA -->
-#
-# <!-- OR -->
-#
-# <!-- TBD OPTIONAL (MULTIPLE) COMMON TIME ELEMENTS AND
-# OPTIONAL (MULTIPLE) DATUM ELEMENTS-->
-#
-# <!-- OR -->
-#
-# <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
-#
-# <!-- OR -->
-#
-# <!-- OPTIONAL (MULTIPLE) KEY ELEMENTS -->
-#
-# <!-- OR -->
-#
-# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
-#
-# </nmwg:data>
-#
# ##############################################################

-SNMPData =
- element nmwg:data {
+SNMPKey =
+ element nmwg:key {
+ Identifier? &
+ (
+ Parameters |
+ SNMPKeyParameters
+ )
+ }
+
+SNMPKeyParameters =
+ element nmwg:parameters {
Identifier &
- MetadataIdentifierRef? &
+ SNMPKeyParameter+
+ }
+
+SNMPKeyParameter =
+ element nmwg:parameter {
+ attribute name { "type" | "valueUnits" | "file" |
+ "dataSource" | "table" } &
(
- (
- Metadata* |
- SNMPMetadata*
- ) |
- (
- SNMPCommonTime+ &
- (
- SNMPDatum* |
- ResultDatum*
- )
- ) |
- (
- SNMPDatum* |
- ResultDatum*
- ) |
- Key*
+ attribute value { text } |
+ text
)
}

-
# ##############################################################
-# CommonTime is used a a shortcut able to 'factor out' a frequently
-# occurring time range that a bunch of datum (or other) elements
-# might share, thus reducing complexity of XML representation.
-# CommonTime is similar to the other NMWG time stamps (from
-# nmtime.rnc) in its potential time representations.
+#
+# Data can be a key, a result datum, or general/specific incarnations
+# of the datum element.
#
-# Example:
-#
-# <nmwg:commonTime type="REQUIRED_TYPE" value="OPTIONAL_VALUE"
-# duration="OPTIONAL_DURATION"
-# inclusive="OPTIONAL_INCLUSIVE_FLAG"
-# xmlns:nmwg="http://ggf.org/ns/nmwg/base/2.0/";>
-#
-# <!-- TBD OPTIONAL START TIME ELEMENT (USE END TIME OR DURATION) -->
-#
-# <!-- TBD OPTIONAL END TIME ELEMENT (ONLY WITH START TIME) -->
-#
-# <!-- TBD OPTIONAL TIME VALUE ELEMENT (USE IF NO VALUE ATTRIBUTE) -->
-#
-# <!-- TBD OPTIONAL (MULTIPLE) DATUM ELEMENTS -->
-#
-# <!-- ANY OPTIONAL (MULTIPLE) ELEMENT IN ANY NAMESPACE -->
-# </nmwg:commonTime>
-#
# ##############################################################

-SNMPCommonTime =
- element nmwg:commonTime {
- Type &
- (
- TimeStamp |
- (
- StartTime &
- (
- EndTime |
- Duration
- )
- )
- ) &
- (
+SNMPData =
+ element nmwg:data {
+ Identifier &
+ MetadataIdentifierRef? &
+ (
+ Datum* |
SNMPDatum* |
- ResultDatum*
+ ResultDatum* |
+ Key*
)
}


# ##############################################################
-# These are the basic elements we would expect to see in the
-# specific snmp datum.
+#
+# Datum is left unspecified at the moment, simply returning
+# the time/value pair.
#
-# Example:
-#
-# <snmp:datum xmlns:nmwg="http://ggf.org/ns/nmwg/tools/snmp/2.0/";>
-#
-# <!-- ANY ELEMENT -->
-#
-# </snmp:datum>
-#
# ##############################################################

SNMPDatum =
element snmp:datum {
- attribute type { "TimeTicks" | "IPAddress" | "String" |
- "ObjectIdentifier" | "NULL" | "Bits" |
- "Integer32" | "UnsignedInteger32" |
- "Counter32" | "Guage32" | "Integer64" |
- "UnsignedInteger64" | "Counter64" |
- "Guage64" } &
attribute value { xsd:string } &
(
(

Modified: trunk/nmwg/schema/test-instances.sh
===================================================================
--- trunk/nmwg/schema/test-instances.sh 2007-06-14 17:38:29 UTC (rev 235)
+++ trunk/nmwg/schema/test-instances.sh 2007-06-19 15:07:47 UTC (rev 236)
@@ -2,7 +2,7 @@

rm -f *.rng *.xsd

-JAVA=/usr/lib/j2sdk1.5-sun/bin/java
+JAVA=/usr/lib/jvm/java-1.5.0-sun/jre/bin/java
TRANG=./verify/trang.jar
JING=./verify/jing.jar
MSV=./verify/msv.jar
@@ -10,6 +10,15 @@
SCHEMA_DIR=rnc
INSTANCE_DIR=example_instances

+
+# test snmp instance
+rm -f rnc/*rng rnc/*xsd
+
+$JAVA -jar $TRANG -I rnc -O rng $SCHEMA_DIR/snmp.rnc $SCHEMA_DIR/snmp.rng
+$JAVA -jar $TRANG -I rng -O xsd $SCHEMA_DIR/snmp.rng $SCHEMA_DIR/snmp.xsd
+$JAVA -jar $MSV -warning $SCHEMA_DIR/snmp.rng $INSTANCE_DIR/snmp.xml
+$JAVA -jar $JING $SCHEMA_DIR/snmp.rng $INSTANCE_DIR/snmp.xml
+
# test ping instance
rm -f rnc/*rng rnc/*xsd

@@ -140,5 +149,6 @@
$JAVA -jar $MSV -warning $SCHEMA_DIR/XML_Schema_v03_final.rng
$INSTANCE_DIR/dfn-top.xml
$JAVA -jar $JING $SCHEMA_DIR/XML_Schema_v03_final.rng
$INSTANCE_DIR/dfn-top.xml

+
rm -f rnc/*rng rnc/*xsd




  • nmwg: r236 - in trunk/nmwg/schema: . example_instances rnc, svnlog, 06/19/2007

Archive powered by MHonArc 2.6.16.

Top of Page