Skip to content

[google compute] improve MachineType (size) coverage of GCE API #396

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

Closed
wants to merge 1 commit into from
Closed

[google compute] improve MachineType (size) coverage of GCE API #396

wants to merge 1 commit into from

Conversation

erjohnso
Copy link
Contributor

Minor improvements to GCE Machine Types (sizes in libcloud parlance) to match GCE API.

  • added missing resource attributes to GCENodeSize
  • hiding some parameters from extra since they've been removed (namely imageSpaceGb)
  • minor change to the disk.size value based on presence/absence of attributes

Updated test fixture and test.

@@ -3508,11 +3508,27 @@ def _to_node_size(self, machine_type):
:rtype: :class:`GCENodeSize`
"""
extra = {}
disk_size = 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@erjohnso so we cannot change the disk_size through an argument ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Runseb - no, you can't change parameters on a GCE MachineType. These are analogous to AWS "sizes" like x2.large, c2.medium (or whatever they are). They are static descriptions of the "size" of VM.

Google has made a change to the API since this code was originally contributed and now the most appropriate way to report a MachineType's disk size is to use maximumPersistentDisksSizeGb over the now rarely seen imageSpaceGb attribute.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok cool, I have not used GCE in couple months :)

erjohnso added a commit that referenced this pull request Nov 23, 2014
Signed-off-by: Sebastien Goasguen <runseb@gmail.com>

This closes #396
@erjohnso erjohnso closed this Dec 10, 2014
@erjohnso erjohnso deleted the GCE_MachineTypes branch December 18, 2014 22:16
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

Successfully merging this pull request may close these issues.

2 participants