incubator-deltacloud-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Added OPTIONS call to get all constraints associated to parameters for given operation in collection
Date Tue, 21 Jun 2011 11:59:09 GMT

This patch will add body for 'OPTIONS /api/collection' which will contain all parameter constrains
for operations defined for this collection.

You can get constraints using:

curl -XOPTIONS -H 'Accept: application/xml' "http://mockuser:mockpassword@localhost:3001/api;driver=rhevm/instances"
curl -XOPTIONS -H 'Accept: application/xml' "http://mockuser:mockpassword@localhost:3001/api;driver=ec2/buckets"

The XML output is:

<api driver='rhevm' version='0.3.0'>
  <collection name='instances'>
    <operation href='/api;driver=rhevm/instances' method='post' name='create' url='/api;driver=rhevm/instances'>
      <param feature='user_name' name='name'>
        <description><![CDATA[The user-defined name]]></description>
        <constrain name='type' value='string'></constrain>
        <constrain name='required' value='false'></constrain>
        <constrain name='max_length' value='50'></constrain>

This is just an 'idea' proposal, I'm open for discussion about XML/URL format. The goal is
to give client a tool to
build a 'form' for executing operations with per-driver validation.

  -- Michal

View raw message