GithubHelp home page GithubHelp logo

Comments (3)

afgane avatar afgane commented on August 28, 2024 1

To make the behavior of default_zone more explicit, let's require the default_zone parameter when creating a Google provider in CloudBridge.

from cloudbridge.

afgane avatar afgane commented on August 28, 2024

Nuwan and I had a chat about this just now and feel that a better solution would be to keep the interface as is; namely, require the zone to be supplied as a parameter when creating a Subnet. Then, internal to the GCE provider, the region to which the supplied zone belongs to can be extracted and used in the request. For example, OpenStack implementation adheres to the interface but simply ignores the zone argument.

Another point that came up while looking at this is use of provider.default_zone in several places in the GCE implementation (e.g., instance reboot method). Using default_zone in methods that don't create resources, including the provider should be removed. This is because if, for example, a zone was specified when creating an instance yet that zone is different from the default_zone, the query won't work as expected. Instead, the resource zone should be extracted from the selfLink.
The only place this won't work right away is in the InstanceTypeService, instance_data method because there is no local resource object. Instead, it looks like using aggregatedList method instead of the list method would do the trick and not require a zone to be specified.

from cloudbridge.

afgane avatar afgane commented on August 28, 2024

I just looked at the use of default_zone throughout the GCE implementation and I think the issue we identified in the previous comment has been corrected at this point. I feel the only potential issue with the use of that parameter may come up in the Snapshot.create method where the snapshot is being created in the default_zone. Instead, maybe we should be creating it in the volume.zone_id zone. And it's a big maybe (as in probably not) because the volumes.list method will return only the volumes from the current default region so in principle a given CloudBridge session should not even see the volumes outside the default_zone.

Unless I'm missing something here, I move we close this issue.

from cloudbridge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.