Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14763)

Issue 11578043: Azure provider: delete Virtual Network

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 9 months ago by rvb
Modified:
10 years, 9 months ago
Reviewers:
mp+175787, fwereade, rog
Visibility:
Public.

Description

Azure provider: delete Virtual Network This branch adds the deletion of the environment's Virtual Network and Affinity Group when the environment is destroyed. I could have divided the test TestDestroyDeletesVirtualNetworkAndAffinityGroup into two separate tests but since the initialization of the test is pretty long and, conceptually, the Virtual Network and the Affinity Group are linked together, I decided to go with one test. https://code.launchpad.net/~rvb/juju-core/delete-vnet-ag/+merge/175787 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+92 lines, -4 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M environs/azure/environ.go View 1 chunk +15 lines, -1 line 3 comments Download
M environs/azure/environ_test.go View 4 chunks +75 lines, -3 lines 0 comments Download

Messages

Total messages: 4
rvb
Please take a look.
10 years, 9 months ago (2013-07-19 14:24:29 UTC) #1
fwereade
one question, but looking good https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go File environs/azure/environ.go (right): https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go#newcode679 environs/azure/environ.go:679: insts, err := env.AllInstances() ...
10 years, 9 months ago (2013-07-19 16:06:15 UTC) #2
rvb
https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go File environs/azure/environ.go (right): https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go#newcode679 environs/azure/environ.go:679: insts, err := env.AllInstances() On 2013/07/19 16:06:15, fwereade wrote: ...
10 years, 9 months ago (2013-07-19 17:23:12 UTC) #3
rog
10 years, 9 months ago (2013-07-23 10:06:30 UTC) #4
LGTM

https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go
File environs/azure/environ.go (right):

https://codereview.appspot.com/11578043/diff/1/environs/azure/environ.go#newc...
environs/azure/environ.go:679: insts, err := env.AllInstances()
On 2013/07/19 17:23:12, rvb wrote:
> On 2013/07/19 16:06:15, fwereade wrote:
> > Hey, does this return ErrNoInstances if there aren't any? If so, we'll still
> > need to delete the virtual network and the affinity group (sometimes
> > destroy-environment will fail halfway through... eg just after successfully
> > destroying all instances).
> > 
> > Could use a test for that case either way. 
> 
> AllInstances() cannot return ErrNoInstances.  Only Instances() does that. 
This
> seems to follow the doc in environs/interface.go, did we interpret that doc
too
> strictly?

That seems just right. It's not an error for AllInstances to return no
instances.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b