<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/30/2013 12:17 AM,
<a class="moz-txt-link-abbreviated" href="mailto:lvroyce@linux.vnet.ibm.com">lvroyce@linux.vnet.ibm.com</a> wrote:<br>
</div>
<blockquote
cite="mid:1388369850-16603-1-git-send-email-lvroyce@linux.vnet.ibm.com"
type="cite">
<pre wrap="">From: Royce Lv <a class="moz-txt-link-rfc2396E" href="mailto:lvroyce@linux.vnet.ibm.com"><lvroyce@linux.vnet.ibm.com></a>
v3>v4, fix inconsistency between doc and json schema
v1>v3, fix racing problem, fix style.
Add parameters to GET request so that we will query storage server as:
/storageservers?type=netfs
Royce Lv (5):
Support params for GET method
Add testcase for GET param
Storage server: Update API.md
storage server: update controller.py
storage server: Update model and mockmodel
docs/API.md | 13 +++++++++++++
src/kimchi/API.json | 11 +++++++++++
src/kimchi/controller.py | 26 ++++++++++++++++++++++++--
src/kimchi/mockmodel.py | 13 +++++++++++++
src/kimchi/model.py | 14 +++++++++++++-
src/kimchi/root.py | 1 +
tests/test_rest.py | 37 +++++++++++++++++++++++++++++++++++++
7 files changed, 112 insertions(+), 3 deletions(-)
</pre>
</blockquote>
<br>
<font face="DejaVu Sans Mono">Let me explain what I expect with this
patch set:<br>
<br>
GET /storageservers will return all storage servers<br>
Example:<br>
<br>
[<br>
{'host': 'localhost',<br>
'target_type': 'netfs',<br>
'sources': ['/srv', '/mnt/isos'],<br>
}</font><br>
<font face="DejaVu Sans Mono"><font face="DejaVu Sans Mono">{'host':
'123.234.123.12',<br>
'target_type': 'iscsi',<br>
'sources': ['</font></font>iqn.2013-06.com.example:iscsi-pool<font
face="DejaVu Sans Mono"><font face="DejaVu Sans Mono">'],<br>
}<br>
</font>]<br>
<br>
<br>
GET /storageservers?target_type=<server-type> will return
only the storage servers with type <server-type><br>
</font>Example: GET <font face="DejaVu Sans Mono">/storageservers?target_type=netfs</font><br>
<font face="DejaVu Sans Mono"><font face="DejaVu Sans Mono"><br>
[<br>
{'host': 'localhost',<br>
'target_type': 'netfs',<br>
'sources': ['/srv', '/mnt/isos'],<br>
}<br>
]<br>
<br>
</font>GET /storageservers/<id> will return data related to
this specific server<br>
</font>Example: GET <font face="DejaVu Sans Mono">/storageservers/localhost<br>
<br>
</font><font face="DejaVu Sans Mono">{'host': 'localhost',<br>
'target_type': 'netfs',<br>
'sources': ['/srv', '/mnt/isos'],<br>
}<br>
<br>
The 'sources' for netfs, for example, will be the parsed output
from "showmount -e <host>" command.<br>
<br>
So when the user want to create NFS pool with a new server (never
used before)<br>
<br>
POST /storageservers/new-nfs-server<br>
</font><br>
<font face="DejaVu Sans Mono"><font face="DejaVu Sans Mono">{'host':
'</font></font><font face="DejaVu Sans Mono"><font face="DejaVu
Sans Mono"><font face="DejaVu Sans Mono">new-nfs-server</font>',<br>
'target_type': 'netfs',<br>
'sources': ['/srv', '/mnt'],<br>
}<br>
<br>
Then the user know which paths are available to create the NFS
pool<br>
<br>
Does that make sense for you?<br>
</font></font>
</body>
</html>