Subject: Comments on monitoring-01

From: Balazs Lengyel <[email-masked]>
Date: Wed, 27 Feb 2008 17:10:16 +0100

Hello Mark, Sharon, Martin,

It is very welcome that the schema discovery is integrated into the previous draft, but I feel 
many of my previous comments were not considered.

I propose to add the attached YANG schema as an informative (non-normative) appendix. If you 
include it I promise to keep it up to date.

General)
Netconf related performance counters are needed. E.g.
- number of sessions
- number of current sessions
- number of messages, per operation type
- number of faults (authentication, XML, etc.)

The data model is described in XML schema which is just one possibility. At the moment it is
missing real references for session and stream. I think a Yang model shall be added at least as
a non-normative appendix (see attachment). Anyway we should clarify the content of the data
model now, and hopefully by the next (next after next, next after next after next :-( ) IETF we 
will know more about the modeling methodology.

Chapter 1)
Do we need this? I propose to remove it.

Ch 1.1) Remove the last sentence for operation.

Ch.2)
Why is the capabilities not EXACTLY the same as the set exchanged during session setup?

lockStatus should be extended with partial locking information

Ch 3.1)
You mention the <list-schema> operation then in the example you use a <get> ???

The example about fetching a schema inline seems to describe just some other unexplained method 
to fetch information about a schema.

&lt; used sometimes instead of >

Ch 4)
The schema is not well formed as a quote is missing

Netconf state should not be the root level element, rather we should have something like
netconf/netconfState.

NetconfSessionInfo is sometimes but not everywhere renamed ManagementSessionInfo

In types LockStatus, NetconfSubscriptionInfo real references to the sessionId would be good. 
This should be described at least in the documentation clause.

How is it possible to have zero ConfigurationDatastoreInfo or capability elements?

How do we represent CLI/GUI/etc. sessions? If we are speaking about locking the session can be
    an internal process like backup or restart.

Description for sourceIdentifier is missing from the schema. Generally should the schema be 
understandable in itself? In this case it is not enough to put descriptions in the RFC (some 
accompanying text0, they must appear in the schema as well. As we propose to make the schema 
downloadable it should be understandable in itself.

Partial locking shall be included in the schema.
The sessionId must be always present for the lock. A real reference (keyRef) to the session
object would be even better.

stream should have a type of ncEvent:streamNameType. A real reference to the stream in the
Notification Management Schema would be even better. (keyRef)

Remove namedProfile

What does lastModified mean for subscriptions? AFAIK subscriptions can not be modified.
Should it be removed?

The transportType, sessionType should be an an extensible enumeration. E.g. put at least 
commonly used string into the description. It is still better then a free form string.

srcIdentifier: say something more specific about it's content e.g. a union of ipv4Address, 
ipv6Address, xs:string

regards Balazs
module netconf-state {

    namespace "urn:ietf:params:xml:ns:netconf:state:1.0";
    prefix "ns";

    import yang-types { prefix yang; }
    import inet-types { prefix inet; }

    organization
        "IETF";

    description
        "NetConf Monitoring Schema.
         All elements in this Schema are read-only.";

    revision "2008-02-27" {
        description
          "Updated to match draft-ietf-netconf-monitoring-01
		   Some proposed improvement included";
    }
    revision "2008-02-01" {
        description
          "Updated to match draft-bjorklund-netconf-yang-01";
    }
    revision "2007-11-12" {
        description
        "Updated to match draft-scott-netconf-monitoring-00.txt";
    }
    revision "2007-07-22" {
        description "Initial revision.";
    }

    typedef SessionId {
        type uint32 {
            range "1..4294967295";
        }
        reference "rfc4741";
    }

    typedef ConfigName {
        type enumeration {
            enum "running";
            enum "candidate";
            enum "startup";
        }
        reference "rfc4741";
    }

    grouping transportType { // should be used, but the draft currently uses a simple string
        choice transportType { 
            mandatory true;
            leaf "console" {type empty;}
            leaf "tcp" {type empty;}
            leaf "ssh" {type empty;}
            leaf "ssl" {type empty;}
        }
    }

    grouping sessionType { // should be used, but the draft currently uses a simple string
        choice sessionType { 
            mandatory true;
            leaf "cli" {type empty;}
            leaf "netconf" {type empty;}
            leaf "webui" {type empty;}
        }
    }

    typedef srcIdentifier {
        description 
        "Information about source of the session.
        IPv4Address, IPv6Address, DNS name or any other form is allowed";
        type union {
            type inet:ipv4-address;
            type inet:ipv6-address;
            type inet:domain-name;
            type string ;
           }
    }

    container netconfState {
        config false;

        container capabilities {
            description 
                "List of NETCONF capabilities supported
                 by this device.";
            leaf-list capability {
                type yang:uri;
                min-elements 1;
            }
        }

        container sessions {
            description
                "List of NETCONF sessions currently
                 active on this device.";
            list session {
                key sessionId;
                leaf sessionId { type SessionId; }
                leaf username  { type string; }
                  leaf transport { type string; }
                leaf protocol  { type string; }
                leaf sourceIdentifier { type srcIdentifier; }
                leaf loginTime { type yang:date-and-time; }
            }
        }

        container configurations {
            description
                "List of NETCONF configuration datastores (e.g. running,
                 startup, candidate) supported on this device and related
                 information.";
            list config {
                key name;
                leaf name { type ConfigName; }
                container lockStatus {
                    description
                        "An indication of whether a resource is locked or
                         unlocked.  If locked, additional information about
                         the locking such as user an time stamp is provided.";
                    leaf lock-state {
                        type enumeration {
                            enum "locked";
                            enum "unlocked";
                        }
                    }
                    leaf lockedBySession {
                        type SessionId;
                        description 
                            "The session ID of the session that has locked
                             this resource.";
                    }
                    leaf lockedTime {
                        type yang:date-and-time;
                        description
                            "The date and time of when the resource was
                             locked. If the resource is currently unlocked,
                             this element will not be present.";
                    }
                }
            }

            container subscriptions {
                description
                    "List of NETCONF notification subscriptions
                     active on this device and related information.";
                list subscription {
                    key session-id;
                    description
                        "Information about Netconf Notification Subscriptions.";
                    leaf session-id {
                        type SessionId;
                        description
                            "The session id associated with this subscription.";
                    }
                    leaf stream {
                        type string;
                        description
                            "The stream associated with this subscription.";
                    }
                    anyxml filter {
                        description 
                            "The filters associated with this subscription.";
                    }
                    leaf messagesSent {
                        type yang:zero-based-counter32;
                        description
                            "A count of event notifications sent along
                             this connection since the subscription was
                             created.";
                    }
                }
            }
        }
    }
}