[Nml-wg] Simple example #1

Freek Dijkstra Freek.Dijkstra at sara.nl
Mon Jul 9 11:15:01 EDT 2012


On 09-07-2012 16:17, Roman Łapacz wrote:

> please, take a look at the attachment. Waiting for comments.

Hi Roman,

Are there any specifics you like us to comment on?

I had a quick look, and these are things I would probably describe
differently.


version
-------

Version is a serial number, akin to a serial number in DNS SOA records,
I wouldn't make this a number (so it is easy to compare date), not a
URN. Also, I probably would simply describe it as an XML attribute
instead of child element, but that is admittedly a matter of preference.

>   <nml:Topology id="urn:ogf:network:domainx.net:2012:org">
> 
>     <nml:name>Domain X</nml:name>
>     <nml:version>urn:ogf:network:domainx.net:2012:20120709<nml:version>

Suggested change:

>   <nml:Topology id="urn:ogf:network:domainx.net:2012:org" version="20120709">
> 
>     <nml:name>Domain X</nml:name>

Implicit relations
------------------
> <nml:Topology xmlns:nml="http://schemas.ogf.org/nml/2012/07/base/"
>               id="urn:ogf:network:gn3.net:2012:org">
> [...]
> 
>   <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasTopology">
>     <nml:Topology idRef="urn:ogf:network:domainx.net:2012:org"/>
>     <nml:Topology idRef="urn:ogf:network:domainy.net:2012:org"/>
>   </nml:Relation>
> 
> 
> [...]
>   <nml:Topology id="urn:ogf:network:domainx.net:2012:org">
> 
>     <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasNode">
>       <nml:node idRef="urn:ogf:network:domainx.net:2012:nodeA"/>
>     </nml:Relation>
>   
> [...]
>   </nml:Topology>
> </nml:Topology>

Some relations, including "hasTopology" and "hasNode" SHOULD be written
implicitly.

This was discussed in https://forge.ogf.org/sf/go/artf6537 and I very
much value your feedback there. (I see that we never reached consensus
on the exact wording there.)

Suggested change:

> <nml:Topology xmlns:nml="http://schemas.ogf.org/nml/2012/07/base/"
>               id="urn:ogf:network:gn3.net:2012:org">
> [...]
> 
>   <nml:Topology idRef="urn:ogf:network:domainx.net:2012:org"/>
>   <nml:Topology idRef="urn:ogf:network:domainy.net:2012:org"/>
> 
> 
> [...]
>   <nml:Topology id="urn:ogf:network:domainx.net:2012:org">
> 
>     <nml:Node idRef="urn:ogf:network:domainx.net:2012:nodeA"/>
>   
> [...]
>   </nml:Topology>
> </nml:Topology>

or even:

> <nml:Topology xmlns:nml="http://schemas.ogf.org/nml/2012/07/base/"
>               id="urn:ogf:network:gn3.net:2012:org">
> 
> [...]
>   <nml:Topology id="urn:ogf:network:domainx.net:2012:org">
> 
>     <nml:Node idRef="urn:ogf:network:domainx.net:2012:nodeA"/>
>   
> [...]
>   </nml:Topology>
> </nml:Topology>

Case
----

See https://forge.ogf.org/sf/go/artf6534

You have written a few times:

> nml:node
> nml:location
> nml:port

Suggested change:

> nml:Node
> nml:Location
> nml:Port

locatedAt
---------

You wrote:

> <nml:node id="urn:ogf:network:domainx.net:2012:nodeA">
>   <nml:location idRef="urn:ogf:network:nordu.net:2011:redcity"/>
> [...]
> </nml:node>

I probably would have written:

> <nml:Node id="urn:ogf:network:domainx.net:2012:nodeA">
>   <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/locatedAt">
>     <nml:Location idRef="urn:ogf:network:nordu.net:2011:redcity"/>
>   </nml:Relation>
> [...]
> </nml:node>

But I like your implicit relation better, so I propose to make locatedAt
an implicit relation (if this was not already the case; I can't seem to
find that.)

Slashes
-------

> <nml:port idRef="urn:ogf:network:domainx.net:2012:A_port_ge-0/2/9-out"/>

Unfortunately, slashes are a reserved character, and not allowed in
URNs. You will have to think of another identifier. I usually make up
something like this:

> <nml:port idRef="urn:ogf:network:domainx.net:2012:A:port_ge-0.2.9-out"/>

hasPort
-------

>     <nml:port id="urn:ogf:network:domainx.net:2012:A_port_ge-0/2/9-out">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasPort">
>         <nml:PortGroup idRef="urn:ogf:network:domainx.net:2012:domainx-domainy"/>
>       </nml:Relation>
>     </port>
> 
>     <nml:port id="urn:ogf:network:domainx.net:2012:A_port_ge-0/2/9-in">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasPort">
>         <nml:PortGroup idRef="urn:ogf:network:domainx.net:2012:domainx-domainy"/>
>       </nml:Relation>
>     </port>

I'm not entirely sure what you are describing here. hasPort was recently
introduced to describe that a given Port is part of a larger PortGroup.

Did you perhaps meant to write:

>     <nml:PortGroup id="urn:ogf:network:domainx.net:2012:domainx-domainy">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasPort">
>         <nml:Port idRef="urn:ogf:network:domainx.net:2012:A_port_ge-0/2/9-out"/>
>       </nml:Relation>
>     </nml:PortGroup>
> 
>     <nml:PortGroup id="urn:ogf:network:domainx.net:2012:domainx-domainy">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasPort">
>         <nml:Port idRef="urn:ogf:network:domainx.net:2012:A_port_ge-0/2/9-in"/>
>       </nml:Relation>
>     </nml:PortGroup>

However, I'm still a bit of at a loss at the exact meaning -- above two
PortGroups have the same identifier, but the Ports have a different
directions. Did you intend to describe a PortGroup here, or a
BidirectionalPort, or yet something else?


Same for
>     <nml:port id="urn:ogf:network:domainy.net:2012:C_port_ge-5/2/7-out">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/hasPort">
>         <nml:Port idRef="urn:ogf:network:domainy.net:2012:B-to-C"/>
>       </nml:Relation>
>     </port>

Did you mean here that urn:ogf:network:domainy.net:2012:B-to-C is a Link
instead? Eg.

>     <nml:Port id="urn:ogf:network:domainy.net:2012:C_port_ge-5/2/7-out">
>       <nml:Relation type="http://schemas.ogf.org/nml/2012/07/relation/isSource">
>         <nml:Link idRef="urn:ogf:network:domainy.net:2012:C-to-B"/>
>       </nml:Relation>
>     </nml:port>

(note the hasPort -> isSource, nml:Port -> nml:Link and B-to-C -> C-to-B)

Links
-----

You never seem to connect any of the urn:ogf:network:domainx.net:2012:*
identifiers to any of the urn:ogf:network:domainy.net:2012:* identifiers.

How do you describe that domains X and Y are connected to each other? I
may have overlooked it (If I stare too much at XML and I'm bound to miss
the obvious).


Typos
-----

This is all perfectly valid NML, but likely typos nevertheless :)

> <!-- --------------------------------- Doman X ---------------------------------  -->
> <!-- --------------------------------- Doman Y ---------------------------------  -->

>       <nml:location idRef="urn:ogf:network:nordu.net:2011:redcity"/>

>     <nml:port ...> .... </port>

Regards,
Freek


More information about the nml-wg mailing list