Subject: Re: [netmod] 6991bis - Any plans to add more URI Syntax components?

From: Schönwälder, Jürgen <[email-masked]>
Date: Tue, 1 Oct 2019 08:54:15 +0000

Mahesh,

can you share you definitions so that people can look at them and take
an informed decision whether this is something they can use as well?
Having some concrete use cases (in the IETF) is likely useful to make
something a common YANG datatype.

/js

On Mon, Sep 30, 2019 at 02:27:49PM -0700, Mahesh Jethanandani wrote:
> Hi Juergen,
> 
> > On Sep 28, 2019, at 1:57 AM, Schönwälder, Jürgen <[email-masked]> wrote:
> > 
> > Hi Mahesh,
> > 
> > are these frequently needed? Are there YANG modules that use these
> > fields already?
> 
> Over in ETSI, I just added them to the YANG model that defines VNF Descriptors (VNFD), as part of what is called VnfConfigurableProperties.
> 
> In addition, I know that draft-kwatsen-netconf-http-client-server draft tries to define 'user-id'. And there has been discussion around draft-ietf-netconf-https-notif needing to define a ‘path’ attribute, although Martin does not think it is needed. Anyway, these are the instances I know of that could use these definitions. I am sure there are more.
> 
> Cheers.
> 
> > 
> > /js
> > 
> > On Fri, Sep 27, 2019 at 06:39:54PM -0700, Mahesh Jethanandani wrote:
> >> Hi Juergen,
> >> 
> >> Is there a plan to add more URI syntax components in rfc6991bis? I know there is a typedef for uri, but I was looking specifically for the following that are defined in RFC 3986.
> >> Scheme
> >> Authority field including
> >> User information
> >> Path
> >> Query
> >> Fragment
> >> 
> >> Thanks.
> >> 
> >> Mahesh Jethanandani
> >> [email-masked]
> >> 
> >> 
> >> 
> > 
> >> _______________________________________________
> >> netmod mailing list
> >> [email-masked]
> >> https://www.ietf.org/mailman/listinfo/netmod
> > 
> > 
> > -- 
> > Juergen Schoenwaelder           Jacobs University Bremen gGmbH
> > Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
> > Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>
> 
> Mahesh Jethanandani
> [email-masked]
> 
> 
> 

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

---

From: Mahesh Jethanandani <[email-masked]>
Date: Tue, 1 Oct 2019 15:20:59 -0700

Hi Juergen

Ok. I had most of the definitions as strings with no pattern restrictions. On your prompting, I started to put them together. Note, I do not have a definition for ‘path’ as yet. I will work on it next. For the remaining, here is what I came up with. I have not tested all of them with all possible patterns, so I am sure some of them will need tweaking.

  typedef scheme {
    type string {
      pattern '([a-zA-Z][a-zA-Z\d+-.]*)';
    }
    description
      "Each URI begins with a scheme name that refers to a 
       specification for assigning identifiers within that scheme.";
    reference
      "RFC 3986, Section 3.1: URI Generic Syntax.";
  }

  typedef userinfo {
    type string {
      pattern '(([a-zA-Z\d\-._~\!$&amp;\'()*+,;=%]*)@?)';
    }
    description
      "The userinfo subcomponent consists of a user name.
       The user information, if present, is followed by an optional
       commercial at-sign ('@') that delimits it from the host.";
    reference
      "RFC 3986, Section 3.2.1: URI Generic Syntax.";
  }

  typedef query {
    type string {
      pattern '\?([a-zA-Z\d\-._~\!$&amp;\'()*+,;=]*)';
    }
    description
      "The query component contains non-hierarchical data that,
       along with data in the path component,
       serves to identify a resource within the scope of the
       URI's scheme and naming authority (if any).";
    reference
      "RFC 3986, Section 3.4: URI Generic Syntax.";
  }

  typedef fragment {
    type string {
      pattern '\#([a-zA-Z\d\-._~\!$&amp;\'()*+,;=]*)?$';
    }
    description
      "The fragment identifier component of a URI allows indirect
       identification of a secondary resource by reference to a
       primary resource and additional identifying information.
       The identified secondary resource may be some portion or
       subset of the primary resource, some view on representations
       of the primary resource, or some other resource defined or
       described by those representations.";
    reference
      "RFC 3986, Section 3.5: URI Generic Syntax.";
  }

Cheers.

> On Oct 1, 2019, at 1:54 AM, Schönwälder, Jürgen <[email-masked]> wrote:
> 
> Mahesh,
> 

Mahesh Jethanandani
[email-masked]