We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fog::Compute::Google::Operation
Currently requests return an API operation, i.e.: Google::Apis::ComputeV1::Operation: And then usually get parsed by model like so:
Google::Apis::ComputeV1::Operation:
operation = Fog::Compute::Google::Operations.new(:service => service) .get(data.name)
That's a lot of duplicate (and sometimes inconsistent) code[1].
I propose to do the following:
Fog::Google.convert_operation
I would do deprecation in 2.0 and removal in 3.0 but I don't think we can mark it as deprecated somehow if people are using raw requests.
@icco WDYT?
[1]
λ grep -R 'operation = Fog::Compute::Google::Operations.new(:service => service)' . (2) ./lib/fog/compute/google/models/image.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/image.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/http_health_check.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/http_health_check.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/http_health_check.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_instance.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_instance.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/instance_group_manager.rb: operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name, zone.split("/")[-1]) ./lib/fog/compute/google/models/url_map.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/url_map.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/url_map.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/url_map.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/url_map.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/snapshot.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/global_forwarding_rule.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/global_forwarding_rule.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_https_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_https_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_https_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_https_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/network.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/network.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/instance_template.rb: operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name) ./lib/fog/compute/google/models/instance_template.rb: operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name) ./lib/fog/compute/google/models/forwarding_rule.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/forwarding_rule.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/subnetwork.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/subnetwork.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/subnetwork.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/subnetwork.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/route.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/route.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/global_address.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/global_address.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_http_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_http_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/target_http_proxy.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/firewall.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/firewall.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/firewall.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/firewall.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/backend_service.rb: operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name) ./lib/fog/compute/google/models/backend_service.rb: operation = Fog::Compute::Google::Operations.new(:service => service).get(data.name) ./lib/fog/compute/google/models/ssl_certificate.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/ssl_certificate.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/disk.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/disk.rb: operation = Fog::Compute::Google::Operations.new(:service => service) ./lib/fog/compute/google/models/disk.rb: operation = Fog::Compute::Google::Operations.new(:service => service)
The text was updated successfully, but these errors were encountered:
This issue has been marked inactive and will be closed if no further activity occurs.
Sorry, something went wrong.
No branches or pull requests
Currently requests return an API operation, i.e.:
Google::Apis::ComputeV1::Operation:
And then usually get parsed by model like so:
That's a lot of duplicate (and sometimes inconsistent) code[1].
I propose to do the following:
Fog::Google.convert_operation
that will contain the API -> Fog tanslation logic.Fog::Compute::Google::Operation
I would do deprecation in 2.0 and removal in 3.0 but I don't think we can mark it as deprecated somehow if people are using raw requests.
@icco WDYT?
[1]
The text was updated successfully, but these errors were encountered: