Merge lp:~fgimenez/snappy-tests-job/openstack-client into lp:snappy-tests-job

Proposed by Federico Gimenez
Status: Merged
Approved by: Leo Arias
Approved revision: 71
Merged at revision: 71
Proposed branch: lp:~fgimenez/snappy-tests-job/openstack-client
Merge into: lp:snappy-tests-job
Diff against target: 68 lines (+9/-10)
2 files modified
cloud/openstack.go (+7/-8)
cloud/openstack_test.go (+2/-2)
To merge this branch: bzr merge lp:~fgimenez/snappy-tests-job/openstack-client
Reviewer Review Type Date Requested Status
Leo Arias (community) Approve
Review via email: mp+282709@code.launchpad.net

Commit message

Updated cloud client from nova to the generric openstack client to prevent https://bugs.launchpad.net/ubuntu/+source/python-keystoneclient/+bug/1242992

Description of the change

Updated cloud client from nova to the generric openstack client to prevent https://bugs.launchpad.net/ubuntu/+source/python-keystoneclient/+bug/1242992

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

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cloud/openstack.go'
--- cloud/openstack.go 2015-12-01 03:50:02 +0000
+++ cloud/openstack.go 2016-01-15 10:11:08 +0000
@@ -35,10 +35,10 @@
3535
36const (36const (
37 imgTpl = ".*custom.*%s-snappy-core-amd64-%s.*"37 imgTpl = ".*custom.*%s-snappy-core-amd64-%s.*"
38 listImagesCmd = "nova image-list"38 listImagesCmd = "openstack image list"
39 launchInstanceCmdTpl = "nova boot --security-groups ssh --flavor %s --image %s test-%d"39 launchInstanceCmdTpl = "openstack server create --security-group ssh --flavor %s --image %s test-%d"
40 describeInstanceCmdTpl = "nova show %s"40 describeInstanceCmdTpl = "openstack server show %s"
41 killInstanceCmdTpl = "nova delete %s"41 killInstanceCmdTpl = "openstack server delete %s"
42 maxAttempsInstanceWait = 1042 maxAttempsInstanceWait = 10
43 secondsToWaitForInstance = 2043 secondsToWaitForInstance = 20
44)44)
@@ -199,7 +199,6 @@
199199
200 for i := 0; i < maxAttempsInstanceWait; i++ {200 for i := 0; i < maxAttempsInstanceWait; i++ {
201 output, _ := c.Util.ExecCommand(params)201 output, _ := c.Util.ExecCommand(params)
202
203 if instanceIP = extractInstanceIP(output); instanceIP == "" {202 if instanceIP = extractInstanceIP(output); instanceIP == "" {
204 log.Print("IP not found, waiting...")203 log.Print("IP not found, waiting...")
205204
@@ -232,7 +231,7 @@
232 | OS-SRV-USG:terminated_at | - |231 | OS-SRV-USG:terminated_at | - |
233 | accessIPv4 | |232 | accessIPv4 | |
234 | accessIPv6 | |233 | accessIPv6 | |
235 | <networkid> network | instance_ip |234 | addresses | <networkid>=instance_ip |
236 | config_drive | |235 | config_drive | |
237 | created | 2015-07-27T09:28:49Z |236 | created | 2015-07-27T09:28:49Z |
238 | flavor | m1.small (2) |237 | flavor | m1.small (2) |
@@ -262,8 +261,8 @@
262 line := scanner.Text()261 line := scanner.Text()
263 fields := strings.Fields(line)262 fields := strings.Fields(line)
264263
265 if len(fields) > 3 && fields[2] == "network" {264 if len(fields) > 4 && fields[1] == "addresses" {
266 instanceIP = fields[4]265 instanceIP = strings.Split(fields[3], "=")[1]
267 break266 break
268 }267 }
269 }268 }
270269
=== modified file 'cloud/openstack_test.go'
--- cloud/openstack_test.go 2015-12-01 03:43:15 +0000
+++ cloud/openstack_test.go 2016-01-15 10:11:08 +0000
@@ -31,7 +31,7 @@
31)31)
3232
33const (33const (
34 defaultFlavor = "m1.quitelarge"34 defaultFlavor = "m1.quitelarge"
35 defaultRelease = "1504"35 defaultRelease = "1504"
36 defaultChannel = "edge"36 defaultChannel = "edge"
37 imageListTpl = `| e37ef727-014d-48e8-b0e4-94cf39e1dbbc | ubuntu-released/ubuntu-wily-alpha1-amd64-server-20150624-disk1.img | ACTIVE | |37 imageListTpl = `| e37ef727-014d-48e8-b0e4-94cf39e1dbbc | ubuntu-released/ubuntu-wily-alpha1-amd64-server-20150624-disk1.img | ACTIVE | |
@@ -84,7 +84,7 @@
84| OS-SRV-USG:terminated_at | - |84| OS-SRV-USG:terminated_at | - |
85| accessIPv4 | |85| accessIPv4 | |
86| accessIPv6 | |86| accessIPv6 | |
87| generic_networkid_string network | %s |87| addresses | generic_networkid_string=%s |
88| config_drive | |88| config_drive | |
89| created | 2015-07-27T09:28:49Z |89| created | 2015-07-27T09:28:49Z |
90| flavor | m1.small (2) |90| flavor | m1.small (2) |

Subscribers

People subscribed via source and target branches