fog-openstack icon indicating copy to clipboard operation
fog-openstack copied to clipboard

Fog should consistently implement `ready?` on all model classes

Open loewenstein opened this issue 8 years ago • 1 comments
trafficstars

Some model implementation have a ready? method to check if a resource is ready.

Compare the following two examples: https://github.com/fog/fog-openstack/blob/4217d76368aa0c570b268e96a3cf21f760ccc967/lib/fog/compute/openstack/models/image.rb#L40 https://github.com/fog/fog-openstack/blob/4217d76368aa0c570b268e96a3cf21f760ccc967/lib/fog/image/openstack/v2/models/image.rb

All model classes should implement ready?.

Resources should know which status value should be considered as ready. E.g. image uses status == ACTIVE (see above link) while volume uses status == "available" (see https://github.com/fog/fog-openstack/blob/4217d76368aa0c570b268e96a3cf21f760ccc967/lib/fog/compute/openstack/models/volume.rb#L47)

loewenstein avatar Jan 26 '17 12:01 loewenstein

I agree 👍

If you can spare some time to raise a pull request for models you've seen that aren't doing this then that'd be awesome.

seanhandley avatar Jan 26 '17 20:01 seanhandley