draft-ietf-netmod-geo-location-00.txt   draft-ietf-netmod-geo-location-01.txt 
Network Working Group C. Hopps Network Working Group C. Hopps
Internet-Draft LabN Consulting, L.L.C. Internet-Draft LabN Consulting, L.L.C.
Intended status: Standards Track April 20, 2019 Intended status: Standards Track April 29, 2019
Expires: October 22, 2019 Expires: October 31, 2019
YANG Geo Location YANG Geo Location
draft-ietf-netmod-geo-location-00 draft-ietf-netmod-geo-location-01
Abstract Abstract
This document defines a generic geographical location object YANG This document defines a generic geographical location object YANG
grouping. The geographical location grouping is intended to be used grouping. The geographical location grouping is intended to be used
in YANG models for specifying a location on or in reference to the in YANG models for specifying a location on or in reference to the
Earth or any other astronomical object. Earth or any other astronomical object.
Status of This Memo Status of This Memo
skipping to change at page 1, line 33 skipping to change at page 1, line 33
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 22, 2019. This Internet-Draft will expire on October 31, 2019.
Copyright Notice Copyright Notice
Copyright (c) 2019 IETF Trust and the persons identified as the Copyright (c) 2019 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 6, line 5 skipping to change at page 6, line 5
deal with a location but rather describe something more about the deal with a location but rather describe something more about the
object that is at the location. Module authors are free to add these object that is at the location. Module authors are free to add these
non-location attributes along with their use of this location non-location attributes along with their use of this location
grouping. grouping.
2.6. Tree 2.6. Tree
The following is the YANG tree diagram [RFC8340] for the geo-location The following is the YANG tree diagram [RFC8340] for the geo-location
grouping. grouping.
module: geo-location module: ietf-geo-location
+-- geo-location +-- geo-location
+-- reference-frame +-- reference-frame
| +-- alternate-system? string {alternate-systems}? | +-- alternate-system? string {alternate-systems}?
| +-- astronomical-body? string | +-- astronomical-body? string
| +-- geodetic-system | +-- geodetic-system
| +-- geodetic-datum? string | +-- geodetic-datum? string
| +-- coord-accuracy? decimal64 | +-- coord-accuracy? decimal64
| +-- height-accuracy? decimal64 | +-- height-accuracy? decimal64
+-- (location) +-- (location)
| +--:(ellipsoid) | +--:(ellipsoid)
skipping to change at page 8, line 24 skipping to change at page 8, line 24
"The system in which the astronomical body and "The system in which the astronomical body and
geodetic-datum is defined. Normally, this value is not geodetic-datum is defined. Normally, this value is not
present and the system is the natural universe; however, present and the system is the natural universe; however,
when present this value allows for specifying alternate when present this value allows for specifying alternate
systems (e.g., virtual realities). An alternate-system systems (e.g., virtual realities). An alternate-system
modifies the definition (but not the type) of the other modifies the definition (but not the type) of the other
values in the reference frame."; values in the reference frame.";
} }
leaf astronomical-body { leaf astronomical-body {
type string { type string {
pattern pattern '[ -@\[-\^_-~]*';
'[-0-9a-z #x22#x23#x5B#x5D' +
'!$%&()*+,\./:;<=>?@\\^_`{|}~]+';
} }
default "earth"; default "earth";
description description
"An astronomical body as named by the International "An astronomical body as named by the International
Astronomical Union (IAU) or according to the alternate Astronomical Union (IAU) or according to the alternate
system if specified. Examples include 'sun' (our star), system if specified. Examples include 'sun' (our star),
'earth' (our planet), 'moon' (our moon), 'enceladus' (a 'earth' (our planet), 'moon' (our moon), 'enceladus' (a
moon of Saturn), 'ceres' (an asteroid), moon of Saturn), 'ceres' (an asteroid),
'67p/churyumov-gerasimenko (a comet). The value should '67p/churyumov-gerasimenko (a comet). The value should
be comprised of all lower case ASCII characters not be comprised of all lower case ASCII characters not
including control characters (i.e., values 32..64, and including control characters (i.e., values 32..64, and
91..126)"; 91..126). Any preceding 'the' in the name should not
be included.";
} }
container geodetic-system { container geodetic-system {
description description
"The geodetic system of the location data."; "The geodetic system of the location data.";
leaf geodetic-datum { leaf geodetic-datum {
type string { type string {
pattern pattern '[ -@\[-\^_-~]*';
'[-0-9a-z#x22#x23#x5B#x5D' +
'!$%&()*+,\./:;<=>?@\\^_`{|}~]+';
} }
default "wgs-84"; default "wgs-84";
description description
"A geodetic-datum defining the meaning of latitude, "A geodetic-datum defining the meaning of latitude,
longitude and height. The default is 'wgs-84' which is longitude and height. The default is 'wgs-84' which is
used by the Global Positioning System (GPS)"; used by the Global Positioning System (GPS). The value
SHOULD be comprised of all lower case ASCII characters
not including control characters (i.e., values 32..64,
and 91..126). The IANA registry further restricts the
value by converting all spaces (' ') to dashes ('-')";
} }
leaf coord-accuracy { leaf coord-accuracy {
type decimal64 { type decimal64 {
fraction-digits 6; fraction-digits 6;
} }
description description
"The accuracy of the latitude longitude pair. When "The accuracy of the latitude longitude pair. When
coord-accuracy is specified it overrides the coord-accuracy is specified it overrides the
geodetic-datum implied accuracy. If Cartesian geodetic-datum implied accuracy. If Cartesian
coordinates are in use this accuracy corresponds to coordinates are in use this accuracy corresponds to
skipping to change at page 20, line 5 skipping to change at page 20, line 5
<https://www.rfc-editor.org/info/rfc8340>. <https://www.rfc-editor.org/info/rfc8340>.
[W3CGEO] Popescu, A., "Geolocation API Specification", 11 2016, [W3CGEO] Popescu, A., "Geolocation API Specification", 11 2016,
<https://www.w3.org/TR/2016/ <https://www.w3.org/TR/2016/
REC-geolocation-API-20161108/>. REC-geolocation-API-20161108/>.
Appendix A. Examples Appendix A. Examples
Below is a fictitious module that uses the geo-location grouping. Below is a fictitious module that uses the geo-location grouping.
<CODE BEGINS> file "ietf-uses-geo-location@2019-02-02.yang" module example-uses-geo-location {
module ietf-uses-geo-location {
namespace namespace
"urn:ietf:params:xml:ns:yang:ietf-uses-geo-location"; "urn:example:example-uses-geo-location";
prefix ugeo; prefix ugeo;
import geo-location { prefix geo; } import ietf-geo-location { prefix geo; }
organization "Empty Org"; organization "Empty Org";
contact "Example Author <eauthor@example.com>"; contact "Example Author <eauthor@example.com>";
description "Example use of geo-location"; description "Example use of geo-location";
revision 2019-02-02 { reference "None"; } revision 2019-02-02 { reference "None"; }
container locatable-items { container locatable-items {
description "container of locatable items"; description "container of locatable items";
list locatable-item { list locatable-item {
key name; key name;
description "A of locatable item"; description "A of locatable item";
leaf name { leaf name {
type string; type string;
description "name of locatable item"; description "name of locatable item";
} }
uses geo:geo-location; uses geo:geo-location;
} }
} }
} }
<CODE ENDS>
Figure 3: Example YANG module using geo location. Figure 3: Example YANG module using geo location.
Below is a the YANG tree for the fictitious module that uses the geo- Below is a the YANG tree for the fictitious module that uses the geo-
location grouping. location grouping.
module: ietf-uses-geo-location module: example-uses-geo-location
+--rw locatable-items +--rw locatable-items
+--rw locatable-item* [name] +--rw locatable-item* [name]
+--rw name string +--rw name string
+--rw geo-location +--rw geo-location
+--rw reference-frame +--rw reference-frame
| +--rw alternate-system? string {alternate-systems}? | +--rw alternate-system? string {alternate-systems}?
| +--rw astronomical-body? string | +--rw astronomical-body? string
| +--rw geodetic-system | +--rw geodetic-system
| +--rw geodetic-datum? string | +--rw geodetic-datum? string
| +--rw coord-accuracy? decimal64 | +--rw coord-accuracy? decimal64
skipping to change at page 22, line 6 skipping to change at page 22, line 6
+--rw velocity +--rw velocity
| +--rw v-north? decimal64 | +--rw v-north? decimal64
| +--rw v-east? decimal64 | +--rw v-east? decimal64
| +--rw v-up? decimal64 | +--rw v-up? decimal64
+--rw timestamp? types:date-and-time +--rw timestamp? types:date-and-time
Below is some example YANG XML data for the fictitious module that Below is some example YANG XML data for the fictitious module that
uses the geo-location grouping. uses the geo-location grouping.
<ns0:config xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0"> <ns0:config xmlns:ns0="urn:ietf:params:xml:ns:netconf:base:1.0">
<locatable-items <locatable-items xmlns="urn:example:example-uses-geo-location">
xmlns="urn:ietf:params:xml:ns:yang:ietf-uses-geo-location">
<locatable-item> <locatable-item>
<name>Gaetana's</name> <name>Gaetana's</name>
<geo-location> <geo-location>
<latitude>40.73297</latitude> <latitude>40.73297</latitude>
<longitude>-74.007696</longitude> <longitude>-74.007696</longitude>
</geo-location> </geo-location>
</locatable-item> </locatable-item>
<locatable-item> <locatable-item>
<name>Pont des Arts</name> <name>Pont des Arts</name>
<geo-location> <geo-location>
 End of changes. 14 change blocks. 
21 lines changed or deleted 19 lines changed or added

This html diff was produced by rfcdiff 1.47. The latest version is available from http://tools.ietf.org/tools/rfcdiff/