conf: Add support for cookies for HTTP based disks

Add possibility to specify one or more cookies for http based disks.
This patch adds the config parser, storage and validation of the
cookies.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa
2017-05-09 14:52:40 +02:00
parent 25481e25b1
commit 3b076391be
7 changed files with 255 additions and 0 deletions

View File

@@ -1817,6 +1817,24 @@
</element>
</define>
<define name="diskSourceNetworkProtocolHTTPCookies">
<element name="cookies">
<oneOrMore>
<element name="cookie">
<attribute name="name">
<data type="string">
<param name="pattern">[!#$%&amp;'*+\-.0-9A-Z\^_`a-z|~]+</param>
</data>
</attribute>
<data type="string">
<param name="pattern">[!#$%&amp;'()*+\-./0-9:&gt;=&lt;?@A-Z\^_`\[\]a-z|~]+</param>
</data>
</element>
</oneOrMore>
<empty/>
</element>
</define>
<define name="diskSourceNetworkProtocolHTTPS">
<element name="source">
<attribute name="protocol">
@@ -1833,6 +1851,9 @@
<optional>
<ref name="diskSourceNetworkProtocolSSLVerify"/>
</optional>
<optional>
<ref name="diskSourceNetworkProtocolHTTPCookies"/>
</optional>
</element>
</define>
@@ -1849,6 +1870,9 @@
<optional>
<ref name="encryption"/>
</optional>
<optional>
<ref name="diskSourceNetworkProtocolHTTPCookies"/>
</optional>
</element>
</define>