fog-openstack
fog-openstack copied to clipboard
Fog should consistently implement `ready?` on all model classes
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)
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.