fog-google
fog-google copied to clipboard
Get rid of "name eq .*#{identity}" logic
So, if I'm reading it right the "name eq .*#{identity}" logic is not needed anymore.
I'm talking about the "Servers" for example: https://github.com/fog/fog-google/blob/8780575ea089e75b8628565ec6f112e5e850b419/lib/fog/compute/google/models/servers.rb#L34-L38
I think we shouldn't append the .*
to the filter (which used to be important when selecting by self-links, but not anymore) and let users set their own regex if they choose to.
This will also get rid of #33
This is a breaking change so setting to milestone 2.0
@icco WDYT?
If not needed anymore, let's remove it. I hadn't realized it changed, what's the difference that makes it not needed?
@icco So AFAIK the resources in .all
method used to be looked up by self-link attribute, making it necessary to match my_instance
to https://www.googleapis.com/compute/v1/projects/my-project/zones/australia-southeast1-c/instances/my_instance
. Otherwise I don't see much need with the leading .*
in (:filter => "name eq .*#{identity}")
The problem of changing it to (:filter => "name eq .*#{identity}")
is that if someone relied on old behavior, i.e. server
matching my_server
this will break their lookup.
This issue has been marked inactive and will be closed if no further activity occurs.