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

Issue 11404044: 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:
jtv.canonical, mp+175787
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: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+88 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 4 comments Download
M environs/azure/environ_test.go View 4 chunks +71 lines, -3 lines 1 comment Download

Messages

Total messages: 7
rvb
Please take a look.
10 years, 9 months ago (2013-07-19 09:58:16 UTC) #1
jtv.canonical
If you feel that deleting the network and deleting the affinity group form a logical ...
10 years, 9 months ago (2013-07-19 10:30:04 UTC) #2
jtv.canonical
https://codereview.appspot.com/11404044/diff/1/environs/azure/environ.go File environs/azure/environ.go (right): https://codereview.appspot.com/11404044/diff/1/environs/azure/environ.go#newcode697 environs/azure/environ.go:697: err = env.StopInstances(insts) Do we know that StopInstances is ...
10 years, 9 months ago (2013-07-19 10:30:48 UTC) #3
rvb
https://codereview.appspot.com/11404044/diff/1/environs/azure/environ.go File environs/azure/environ.go (right): https://codereview.appspot.com/11404044/diff/1/environs/azure/environ.go#newcode697 environs/azure/environ.go:697: err = env.StopInstances(insts) On 2013/07/19 10:30:48, jtv.canonical wrote: > ...
10 years, 9 months ago (2013-07-19 10:41:50 UTC) #4
jtv.canonical
Thanks for making sure. Consider adding comments so future maintainers don't have to wonder. LGTM.
10 years, 9 months ago (2013-07-19 10:59:25 UTC) #5
rvb
> That's quite a mouthful! Could you summarize it in a comment? Maybe the "get" ...
10 years, 9 months ago (2013-07-19 11:56:16 UTC) #6
rvb
10 years, 9 months ago (2013-07-19 11:59:14 UTC) #7
On 2013/07/19 10:30:04, jtv.canonical wrote:
> If you feel that deleting the network and deleting the affinity group form a
> logical unit, it would have made sense to make them a single function.  The
test
> would then have broken down naturally into two parts: unit-testing the new
> function (but without the overhead of first simulating a Destroy call) and
> testing that Destroy calls the cleanup (but without testing its details).  It
> would have made it a bit easier to test for error behaviour as well.

Well, this constitutes a logical unit in a sense but I decided against creating
a separate method for it because it would, in fact, complicate the testing (or
rather, make it much more verbose for very little benefit).  Besides, there
wouldn't be any logic in that method except a call to the two methods.  This is
just made less obvious because of the "error dance" Go imposes on us.
Sign in to reply to this message.

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