You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@libcloud.apache.org by Tomaž Muraus <to...@apache.org> on 2012/06/15 08:41:46 UTC

[dev] Libcloud REST feedback

Hey Ilgiz,

I just played with the Libcloud REST and here are some issues / bugs I have
observed:

1. /<version>/compute/providers endpoint

Currently it returns this:

{"providers": ["RACKSPACE_NOVA_DFW", "IBM", "SOFTLAYER", "EC2_EU_WEST",
> "ELASTICHOSTS", "BRIGHTBOX", "BLUEBOX", "EC2_AP_SOUTHEAST", "EC2_US_EAST",
> "OPENNEBULA", "ELASTICHOSTS_UK2", "ELASTICHOSTS_UK1", "ELASTICHOSTS_US2",
> "VPSNET", "VOXEL", "RACKSPACE", "ELASTICHOSTS_US1", "RIMUHOSTING",
> "LINODE", "JOYENT", "NIMBUS", "GOGRID", "DREAMHOST", "ECP", "GANDI",
> "DUMMY", "EC2_US_WEST_OREGON", "EC2_US_WEST", "TERREMARK", "SERVERLOVE",
> "VCL", "NINEFOLD", "CLOUDSIGMA_US", "RACKSPACE_UK", "EC2_AP_NORTHEAST",
> "CLOUDSTACK", "EC2", "VCLOUD", "EC2_SA_EAST", "OPSOURCE", "EUCALYPTUS",
> "EC2_EU", "SKALICLOUD", "SLICEHOST", "LIBVIRT", "CLOUDSIGMA",
> "ELASTICHOSTS_CA1", "RACKSPACE_NOVA_BETA", "OPENSTACK"]}


It should return a flat array. "providers" object container is unnecessary.

Actually, I think we should return more information about every provider -
a list of dictionaries with the following keys:

- id - provider constant which is used in the URL (e.g. RACKSPACE)
- friendly_name (e.g. Rackspace Cloud)
- website - provider website (e.g. http://www.rackspace.com)

Friendly name is already available as a class attribute on the NodeDriver
class ("name"). For the website I'm fine with either adding a new
annotation to a docstring in the driver constructor or adding a new class
attribute to the NodeDriver class.

2. Need to add @requires annotation to constructors for all the compute
drivers.

3. "Unknown error" when trying to create node without passing any payload
in the body. Need to polish it up and return ValidationError.

4. We should return an error if user passes in invalid content type when
issuing POST or PUT request. Only valid content type should be
"application/json".

5. Typo in create_node handler - 'localtion_id'

6. Should return 201 (created) status code instead of 200 when node has
been sucesfully created (create_node).

7. Should return 204 (deleted) status code instead of 200 when a node has
been successfully destroyed (destroy_node).

8. For security reason (resource exhaustion, etc.) we need to limit a
request body size. We need to check Content-Length and return a
ValidationError if length is > MAX_BODY_LENGTH. For now we can set this
variable to 500 KB.

[dev] Re: Libcloud REST feedback

Posted by Ilgiz Islamgulov <il...@gmail.com>.
Hello, thank you.

I'm going to fix this issues / bugs on this week.  I will write about the
progress that I made in the weekly report.

2012/6/15 Tomaž Muraus <to...@apache.org>

> Hey Ilgiz,
>
> I just played with the Libcloud REST and here are some issues / bugs I
> have observed:
>
> 1. /<version>/compute/providers endpoint
>
> Currently it returns this:
>
> {"providers": ["RACKSPACE_NOVA_DFW", "IBM", "SOFTLAYER", "EC2_EU_WEST",
>> "ELASTICHOSTS", "BRIGHTBOX", "BLUEBOX", "EC2_AP_SOUTHEAST", "EC2_US_EAST",
>> "OPENNEBULA", "ELASTICHOSTS_UK2", "ELASTICHOSTS_UK1", "ELASTICHOSTS_US2",
>> "VPSNET", "VOXEL", "RACKSPACE", "ELASTICHOSTS_US1", "RIMUHOSTING",
>> "LINODE", "JOYENT", "NIMBUS", "GOGRID", "DREAMHOST", "ECP", "GANDI",
>> "DUMMY", "EC2_US_WEST_OREGON", "EC2_US_WEST", "TERREMARK", "SERVERLOVE",
>> "VCL", "NINEFOLD", "CLOUDSIGMA_US", "RACKSPACE_UK", "EC2_AP_NORTHEAST",
>> "CLOUDSTACK", "EC2", "VCLOUD", "EC2_SA_EAST", "OPSOURCE", "EUCALYPTUS",
>> "EC2_EU", "SKALICLOUD", "SLICEHOST", "LIBVIRT", "CLOUDSIGMA",
>> "ELASTICHOSTS_CA1", "RACKSPACE_NOVA_BETA", "OPENSTACK"]}
>
>
> It should return a flat array. "providers" object container
> is unnecessary.
>
> Actually, I think we should return more information about every provider -
> a list of dictionaries with the following keys:
>
> - id - provider constant which is used in the URL (e.g. RACKSPACE)
> - friendly_name (e.g. Rackspace Cloud)
> - website - provider website (e.g. http://www.rackspace.com)
>
> Friendly name is already available as a class attribute on the NodeDriver
> class ("name"). For the website I'm fine with either adding a new
> annotation to a docstring in the driver constructor or adding a new class
> attribute to the NodeDriver class.
>
> 2. Need to add @requires annotation to constructors for all the compute
> drivers.
>
> 3. "Unknown error" when trying to create node without passing any payload
> in the body. Need to polish it up and return ValidationError.
>
> 4. We should return an error if user passes in invalid content type when
> issuing POST or PUT request. Only valid content type should be
> "application/json".
>
> 5. Typo in create_node handler - 'localtion_id'
>
> 6. Should return 201 (created) status code instead of 200 when node has
> been sucesfully created (create_node).
>
> 7. Should return 204 (deleted) status code instead of 200 when a node has
> been successfully destroyed (destroy_node).
>
> 8. For security reason (resource exhaustion, etc.) we need to limit a
> request body size. We need to check Content-Length and return a
> ValidationError if length is > MAX_BODY_LENGTH. For now we can set this
> variable to 500 KB.
>