Merge lp:~fgimenez/snappy-tests-job/generalized-ip-extraction into lp:snappy-tests-job

Proposed by Federico Gimenez
Status: Merged
Approved by: Federico Gimenez
Approved revision: 66
Merged at revision: 65
Proposed branch: lp:~fgimenez/snappy-tests-job/generalized-ip-extraction
Merge into: lp:snappy-tests-job
Diff against target: 45 lines (+5/-5)
2 files modified
cloud/canonistack.go (+4/-4)
cloud/canonistack_test.go (+1/-1)
To merge this branch: bzr merge lp:~fgimenez/snappy-tests-job/generalized-ip-extraction
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+275879@code.launchpad.net

Commit message

Generalized ip extraction

Description of the change

Generalized ip extraction, valid for both canonistack and neutron based environments

To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote :

lg. I'm just wondering about the diff in the table. Doesn't look needed.

review: Needs Information
66. By Federico Gimenez

fixed indentation

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Don't blame me, the editor decided that :) fixed

Revision history for this message
Leo Arias (elopio) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloud/canonistack.go'
2--- cloud/canonistack.go 2015-08-11 10:32:38 +0000
3+++ cloud/canonistack.go 2015-10-29 16:58:09 +0000
4@@ -234,7 +234,7 @@
5 | OS-SRV-USG:terminated_at | - |
6 | accessIPv4 | |
7 | accessIPv6 | |
8- | canonistack network | instance_ip |
9+ | <networkid> network | instance_ip |
10 | config_drive | |
11 | created | 2015-07-27T09:28:49Z |
12 | flavor | m1.small (2) |
13@@ -252,8 +252,8 @@
14 | updated | 2015-07-27T09:29:27Z |
15 | user_id | 0534127f70534300baf48e8ac1134734 |
16 +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
17- In this case, the ip should be instace_ip
18-
19+ In this case, the ip should be instace_ip; <networkid> can be canonistack or, for neutron based stacks, a string containing the user name, as in
20+ net_ues-snappy-integration
21 */
22
23 reader := strings.NewReader(output)
24@@ -264,7 +264,7 @@
25 line := scanner.Text()
26 fields := strings.Fields(line)
27
28- if len(fields) > 3 && fields[1] == "canonistack" && fields[2] == "network" {
29+ if len(fields) > 3 && fields[2] == "network" {
30 instanceIP = fields[4]
31 break
32 }
33
34=== modified file 'cloud/canonistack_test.go'
35--- cloud/canonistack_test.go 2015-08-11 10:32:38 +0000
36+++ cloud/canonistack_test.go 2015-10-29 16:58:09 +0000
37@@ -83,7 +83,7 @@
38 | OS-SRV-USG:terminated_at | - |
39 | accessIPv4 | |
40 | accessIPv6 | |
41-| canonistack network | %s |
42+| generic_networkid_string network | %s |
43 | config_drive | |
44 | created | 2015-07-27T09:28:49Z |
45 | flavor | m1.small (2) |

Subscribers

People subscribed via source and target branches