Skip to content
New issue

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

Rethink the get() methods required parameters #396

Closed
Temikus opened this issue Jul 15, 2018 · 2 comments
Closed

Rethink the get() methods required parameters #396

Temikus opened this issue Jul 15, 2018 · 2 comments
Milestone

Comments

@Temikus
Copy link
Member

Temikus commented Jul 15, 2018

Ideally even for zonal and regional resources get() method should try to find the resource enumerating across all zones and regions and not require any parameters.

This seems to have been the case but changed when migrating to 1.0, judging by the test changes:

What I think needs to be done is to make zone/region parameters optional in get() and if none are provided, look up the resources ourselves.

@icco WDYT?

@Temikus Temikus added this to the 2.0 milestone Jul 15, 2018
@Temikus
Copy link
Member Author

Temikus commented Jul 15, 2018

λ grep -R "def get([a-z_\*-]*, " .                                                                                                                              (2)
./lib/fog/google/models/sql/ssl_certs.rb:        def get(instance_id, sha1_fingerprint)
./lib/fog/google/models/sql/backup_runs.rb:        def get(instance_id, backup_run_id)
./lib/fog/storage/google_xml/models/directories.rb:        def get(key, options = {})
./lib/fog/storage/google_xml/models/files.rb:        def get(key, options = {}, &block)
./lib/fog/storage/google_json/models/directories.rb:        def get(bucket_name, options = {})
./lib/fog/storage/google_json/models/files.rb:        def get(key, options = {}, &block)
./lib/fog/compute/google/models/target_pools.rb:        def get(identity, region = nil)
./lib/fog/compute/google/models/addresses.rb:        def get(identity, region)
./lib/fog/compute/google/models/instance_groups.rb:        def get(identity, zone = nil)
./lib/fog/compute/google/models/images.rb:        def get(identity, project = nil)
./lib/fog/compute/google/models/instance_group_managers.rb:        def get(identity, zone = nil)
./lib/fog/compute/google/models/forwarding_rules.rb:        def get(identity, region = nil)
./lib/fog/compute/google/models/operations.rb:        def get(identity, zone = nil, region = nil)
./lib/fog/compute/google/models/disks.rb:        def get(identity, zone)
./lib/fog/compute/google/models/servers.rb:        def get(identity, zone = nil)
./lib/fog/compute/google/models/machine_types.rb:        def get(identity, zone)
./lib/fog/compute/google/models/disk_types.rb:        def get(identity, zone = nil)
./lib/fog/compute/google/models/target_instances.rb:        def get(target_instance, zone = nil)
./lib/fog/compute/google/models/subnetworks.rb:        def get(identity, region)
./lib/fog/dns/google/models/records.rb:        def get(name, type)
./coverage/index.html:          <code class="ruby">        def get(bucket_name, options = {})</code>
./coverage/index.html:          <code class="ruby">        def get(key, options = {}, &amp;block)</code>

@Temikus
Copy link
Member Author

Temikus commented Jul 15, 2018

Sorry, nevermind, already filed under #352
I'll close this out and get some info there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant