[libvirt] [PATCH 05/14] docs: schemas: Extract HTTP disk source specification

Peter Krempa posted 14 patches 8 years, 9 months ago
[libvirt] [PATCH 05/14] docs: schemas: Extract HTTP disk source specification
Posted by Peter Krempa 8 years, 9 months ago
Make the schema more strict for HTTP disks requiring a name and
mandating exactly one source host.

ftp/tftp entries were not moved here, since http transport also will
support cookies and other options, which will be added later.
---
 docs/schemas/domaincommon.rng | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 05efea7f2..e3dc34e08 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -1556,6 +1556,19 @@
     </element>
   </define>

+  <define name="diskSourceNetworkProtocolHTTP">
+    <element name="source">
+      <attribute name="protocol">
+        <choice>
+          <value>http</value>
+          <value>https</value>
+        </choice>
+      </attribute>
+      <attribute name="name"/>
+      <ref name="diskSourceNetworkHost"/>
+    </element>
+  </define>
+
   <define name="diskSourceNetworkProtocolGeneric">
     <element name="source">
       <interleave>
@@ -1565,8 +1578,6 @@
             <value>sheepdog</value>
             <value>gluster</value>
             <value>iscsi</value>
-            <value>http</value>
-            <value>https</value>
             <value>ftp</value>
             <value>ftps</value>
             <value>tftp</value>
@@ -1589,6 +1600,7 @@
     <choice>
       <ref name="diskSourceNetworkProtocolGeneric"/>
       <ref name="diskSourceNetworkProtocolRBD"/>
+      <ref name="diskSourceNetworkProtocolHTTP"/>
     </choice>
   </define>

-- 
2.12.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 05/14] docs: schemas: Extract HTTP disk source specification
Posted by Jiri Denemark 8 years, 9 months ago
On Wed, Apr 26, 2017 at 19:52:35 +0200, Peter Krempa wrote:
> Make the schema more strict for HTTP disks requiring a name and
> mandating exactly one source host.
> 
> ftp/tftp entries were not moved here, since http transport also will
> support cookies and other options, which will be added later.
> ---
>  docs/schemas/domaincommon.rng | 16 ++++++++++++++--
>  1 file changed, 14 insertions(+), 2 deletions(-)
> 
> diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> index 05efea7f2..e3dc34e08 100644
> --- a/docs/schemas/domaincommon.rng
> +++ b/docs/schemas/domaincommon.rng
> @@ -1556,6 +1556,19 @@
>      </element>
>    </define>
> 
> +  <define name="diskSourceNetworkProtocolHTTP">
> +    <element name="source">
> +      <attribute name="protocol">
> +        <choice>
> +          <value>http</value>
> +          <value>https</value>
> +        </choice>
> +      </attribute>
> +      <attribute name="name"/>

The @name attribute was originally optional. Was it optional because
some protocols don't need it by http(s) needs the name? Or should it be
optional even for http(s)?

> +      <ref name="diskSourceNetworkHost"/>
> +    </element>
> +  </define>

Jirka

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 05/14] docs: schemas: Extract HTTP disk source specification
Posted by Peter Krempa 8 years, 9 months ago
On Thu, Apr 27, 2017 at 16:56:13 +0200, Jiri Denemark wrote:
> On Wed, Apr 26, 2017 at 19:52:35 +0200, Peter Krempa wrote:
> > Make the schema more strict for HTTP disks requiring a name and
> > mandating exactly one source host.
> > 
> > ftp/tftp entries were not moved here, since http transport also will
> > support cookies and other options, which will be added later.
> > ---
> >  docs/schemas/domaincommon.rng | 16 ++++++++++++++--
> >  1 file changed, 14 insertions(+), 2 deletions(-)
> > 
> > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> > index 05efea7f2..e3dc34e08 100644
> > --- a/docs/schemas/domaincommon.rng
> > +++ b/docs/schemas/domaincommon.rng
> > @@ -1556,6 +1556,19 @@
> >      </element>
> >    </define>
> > 
> > +  <define name="diskSourceNetworkProtocolHTTP">
> > +    <element name="source">
> > +      <attribute name="protocol">
> > +        <choice>
> > +          <value>http</value>
> > +          <value>https</value>
> > +        </choice>
> > +      </attribute>
> > +      <attribute name="name"/>
> 
> The @name attribute was originally optional. Was it optional because
> some protocols don't need it by http(s) needs the name? Or should it be
> optional even for http(s)?

@name is optional only for NBD
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH 05/14] docs: schemas: Extract HTTP disk source specification
Posted by Jiri Denemark 8 years, 9 months ago
On Thu, Apr 27, 2017 at 17:15:59 +0200, Peter Krempa wrote:
> On Thu, Apr 27, 2017 at 16:56:13 +0200, Jiri Denemark wrote:
> > On Wed, Apr 26, 2017 at 19:52:35 +0200, Peter Krempa wrote:
> > > Make the schema more strict for HTTP disks requiring a name and
> > > mandating exactly one source host.
> > > 
> > > ftp/tftp entries were not moved here, since http transport also will
> > > support cookies and other options, which will be added later.
> > > ---
> > >  docs/schemas/domaincommon.rng | 16 ++++++++++++++--
> > >  1 file changed, 14 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
> > > index 05efea7f2..e3dc34e08 100644
> > > --- a/docs/schemas/domaincommon.rng
> > > +++ b/docs/schemas/domaincommon.rng
> > > @@ -1556,6 +1556,19 @@
> > >      </element>
> > >    </define>
> > > 
> > > +  <define name="diskSourceNetworkProtocolHTTP">
> > > +    <element name="source">
> > > +      <attribute name="protocol">
> > > +        <choice>
> > > +          <value>http</value>
> > > +          <value>https</value>
> > > +        </choice>
> > > +      </attribute>
> > > +      <attribute name="name"/>
> > 
> > The @name attribute was originally optional. Was it optional because
> > some protocols don't need it by http(s) needs the name? Or should it be
> > optional even for http(s)?
> 
> @name is optional only for NBD

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list