TaurusDeviceNameValidator

digraph inheritance41ad4cb9e2 { rankdir=UD; ratio=compress; size="8.0, 12.0"; "TaurusDeviceNameValidator" [color=dodgerblue1,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="Base class for Device name validators."]; }
class TaurusDeviceNameValidator[source]

Bases: taurus.core.taurusvalidator._TaurusBaseValidator

Base class for Device name validators. The namePattern will be composed from URI segments as follows:

<scheme>:[<authority>/]<path>[?<query>][#<fragment>]

Derived classes must provide attributes defining a regexp string for each URI segment (they can be empty strings):

  • scheme
  • authority
  • path
  • query
  • fragment

Additionally, the namePattern resulting from composing the above segments must contain a named group called “devname” (normally within the path segment).

pattern = '^(?P<scheme>%(scheme)s):((?P<authority>%(authority)s)($|(?=[/#?])))?(?P<path>%(path)s)(\\?(?P<query>%(query)s))?(#(?P<fragment>%(fragment)s))?$'