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
=== modified file 'cloud/canonistack.go'
--- cloud/canonistack.go 2015-08-11 10:32:38 +0000
+++ cloud/canonistack.go 2015-10-29 16:58:09 +0000
@@ -234,7 +234,7 @@
234 | OS-SRV-USG:terminated_at | - |234 | OS-SRV-USG:terminated_at | - |
235 | accessIPv4 | |235 | accessIPv4 | |
236 | accessIPv6 | |236 | accessIPv6 | |
237 | canonistack network | instance_ip |237 | <networkid> network | instance_ip |
238 | config_drive | |238 | config_drive | |
239 | created | 2015-07-27T09:28:49Z |239 | created | 2015-07-27T09:28:49Z |
240 | flavor | m1.small (2) |240 | flavor | m1.small (2) |
@@ -252,8 +252,8 @@
252 | updated | 2015-07-27T09:29:27Z |252 | updated | 2015-07-27T09:29:27Z |
253 | user_id | 0534127f70534300baf48e8ac1134734 |253 | user_id | 0534127f70534300baf48e8ac1134734 |
254 +--------------------------------------+-----------------------------------------------------------------------------------------------------------+254 +--------------------------------------+-----------------------------------------------------------------------------------------------------------+
255 In this case, the ip should be instace_ip255 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
256256 net_ues-snappy-integration
257 */257 */
258258
259 reader := strings.NewReader(output)259 reader := strings.NewReader(output)
@@ -264,7 +264,7 @@
264 line := scanner.Text()264 line := scanner.Text()
265 fields := strings.Fields(line)265 fields := strings.Fields(line)
266266
267 if len(fields) > 3 && fields[1] == "canonistack" && fields[2] == "network" {267 if len(fields) > 3 && fields[2] == "network" {
268 instanceIP = fields[4]268 instanceIP = fields[4]
269 break269 break
270 }270 }
271271
=== modified file 'cloud/canonistack_test.go'
--- cloud/canonistack_test.go 2015-08-11 10:32:38 +0000
+++ cloud/canonistack_test.go 2015-10-29 16:58:09 +0000
@@ -83,7 +83,7 @@
83| OS-SRV-USG:terminated_at | - |83| OS-SRV-USG:terminated_at | - |
84| accessIPv4 | |84| accessIPv4 | |
85| accessIPv6 | |85| accessIPv6 | |
86| canonistack network | %s |86| generic_networkid_string network | %s |
87| config_drive | |87| config_drive | |
88| created | 2015-07-27T09:28:49Z |88| created | 2015-07-27T09:28:49Z |
89| flavor | m1.small (2) |89| flavor | m1.small (2) |

Subscribers

People subscribed via source and target branches