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

Add check of availability of VM role size in location #26

Merged
merged 2 commits into from
Jan 30, 2015

Conversation

jen20
Copy link
Contributor

@jen20 jen20 commented Jan 30, 2015

There was previously nothing to prevent creation of a virtual machine of an instance size which was unavailable in a given location - instead the operation completed and getting the status returned a ResourceNotFound error. This pull request makes the following changes:

  • Add a GetLocation function to the locationClient in order to get access to the structure without iterating through the list returned from GetLocationList in multiple spots.
  • Remove the call to verify the instance size against the global list.
  • Add a function verifyInstanceSizeAvailableInLocation to the vmClient and call this in place of verification against the global list.


func GetLocation(location string) (*Location, error) {
if len(location) == 0 {
return nil, fmt.Errorf(azure.ParamNotSpecifiedError, "location")
Copy link
Contributor

Choose a reason for hiding this comment

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

if we're always formatting this azure.ParamNotSpecifiedError string, it shouldn't probably be exposed. can you please change while you're at it, or maybe in a separate PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍 will do on a separate PR

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We have a few options on this - it's used throughout the codebase hence the original decision (I assume) to export it. We could either duplicate wherever necessary and make it internal or leave it as is. Any preference?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #28 for an implementation of this.

ruslangabitov added a commit that referenced this pull request Jan 30, 2015
Add check of availability of VM role size in location
@ruslangabitov ruslangabitov merged commit 7bf29e4 into Azure:master Jan 30, 2015
@jen20 jen20 deleted the check-vm-size-availability branch February 5, 2015 16:40
marstr added a commit to marstr/azure-sdk-for-go that referenced this pull request Apr 27, 2017
* Adding a "Getting Started" section to the README.

* Fixing formating issues.

* Responding to review feedback.
marstr added a commit that referenced this pull request Apr 28, 2017
* Adding a "Getting Started" section to the README.

* Fixing formating issues.

* Responding to review feedback.
mcardosos pushed a commit that referenced this pull request May 4, 2017
* Adding a "Getting Started" section to the README.

* Fixing formating issues.

* Responding to review feedback.
AutorestCI added a commit that referenced this pull request May 23, 2019
Merge pull request #26 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard
AutorestCI added a commit that referenced this pull request Jun 4, 2019
… swagger for GA (#4861)

* Generated from 3c2d64eec013f8a6a4666a83a2e3daf9fd44b821

Merge pull request #25 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard

* Generated from f897f2476e09958144c8dd8f3db8699ee6636763

Merge pull request #26 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard

* Generated from 81ff9dd1f123face9e3dae304a8971234c6a5542

Merge pull request #28 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard
jhendrixMSFT pushed a commit that referenced this pull request Jun 4, 2019
… swagger for GA (#4861)

* Generated from 3c2d64eec013f8a6a4666a83a2e3daf9fd44b821

Merge pull request #25 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard

* Generated from f897f2476e09958144c8dd8f3db8699ee6636763

Merge pull request #26 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard

* Generated from 81ff9dd1f123face9e3dae304a8971234c6a5542

Merge pull request #28 from leonardbf/NFSAAS-2436-R4-corrections

NFSAAS-2436 corrections to R4 standard
richardpark-msft pushed a commit to richardpark-msft/azure-sdk-for-go that referenced this pull request Aug 5, 2021
Upgrading version of Azure-SDK-for-Go
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.

3 participants