[Kimchi-devel] [project-kimchi][PATCHv4 0/5] Storage server query support
Aline Manera
alinefm at linux.vnet.ibm.com
Mon Dec 30 19:49:31 UTC 2013
On 12/30/2013 12:17 AM, lvroyce at linux.vnet.ibm.com wrote:
> From: Royce Lv <lvroyce at linux.vnet.ibm.com>
>
> 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(-)
>
Let me explain what I expect with this patch set:
GET /storageservers will return all storage servers
Example:
[
{'host': 'localhost',
'target_type': 'netfs',
'sources': ['/srv', '/mnt/isos'],
}
{'host': '123.234.123.12',
'target_type': 'iscsi',
'sources': ['iqn.2013-06.com.example:iscsi-pool'],
}
]
GET /storageservers?target_type=<server-type> will return only the
storage servers with type <server-type>
Example: GET /storageservers?target_type=netfs
[
{'host': 'localhost',
'target_type': 'netfs',
'sources': ['/srv', '/mnt/isos'],
}
]
GET /storageservers/<id> will return data related to this specific server
Example: GET /storageservers/localhost
{'host': 'localhost',
'target_type': 'netfs',
'sources': ['/srv', '/mnt/isos'],
}
The 'sources' for netfs, for example, will be the parsed output from
"showmount -e <host>" command.
So when the user want to create NFS pool with a new server (never used
before)
POST /storageservers/new-nfs-server
{'host': 'new-nfs-server',
'target_type': 'netfs',
'sources': ['/srv', '/mnt'],
}
Then the user know which paths are available to create the NFS pool
Does that make sense for you?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/kimchi-devel/attachments/20131230/41a8f308/attachment.html>
More information about the Kimchi-devel
mailing list